javascript how to get html style's custom attribute value

I have html element with some inline styles plus on custom css property. now i can access every style attribute but not my custom style property.

here is my code.

<img id="myimg" class="ImgClass" style="overfolow:hidden;position:absolute;mycustomProp:100;top:15;left:20">

here i cannot get mycustomProp.

Any help?



function getCustomStyle(theId,theStyle) {
    var styles=document.getElementById(theId).getAttribute("style").split(';');
    var astyle;
    for(var i=0;i<styles.length;i++) {
        if(astyle[0]==theStyle) return (astyle[1]);
    return undefined;

document.getElementById("myimg").getAttribute("style") to retrieve the attribute.

document.getElementById("myimg").setAttribute("style",<string>) can be used to change it.









Need Your Help

ode45 Not Enough Initial Conditions

matlab ode differential-equations

I have defined a function using matlabFunction. Here is the code:

What's the equivalent of this Javascript regexp in PHP?

php javascript html regex forms

I have this js regexp which I need in PHP code now instead:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.