Copy code code as follows:
var gotStyle = Function (Elementid, Attribute) {{
obj = document.GetelementByid (Elementid);
// The front is the standard of html behind IE
Return obj.currenTSTYLE? Obj.currentStyle [attribute]: document.defaultView.getComputedstyle (obj, falig
}
There is also a style that can be obtained in HTML
Copy code code as follows:
document.GetelementByid ("Elementid"). STYLE.PADDINGLEFT;