Javascript Reference
Categories: STYLE

javascript STYLE setProperty( )

@March 15, 2008, 1:22 a.m.
setProperty( )Firefox/Netscape/NN 6 IE 5(Mac) Chrome/Safari/DOM 2  

setProperty("CSSAttributeName", "value", "priority")

  

Sets an inline style attribute/value pair. If the attribute already exists, the new value is applied to the existing attribute; otherwise the attribute and value are added to the element.

 
Parameters
 
  • The CSS attribute name from an inline style declaration (not the DOM version of the property name).
  • String of the value in the format applicable to the attribute.
  • String of the priority assignment (such as !important) or empty string.
 
Returned Value

None.


Powered by Linode.