elem.style.propertyName = "value";
Where the propertyName is the property name in CSS with no dashes and written in camel format. For example text-align becomes textAlign. However, for the CSS float property this is a problem because float a keyword in Javascript. Therefore instead you have to use cssFloat.
No comments:
Post a Comment