Use Of Style Attribute in javascript (use of css) |
|||||
59 views
style attributes are easily applicable to javascript code. object.style.styleattribute There is one basic rule you have to follow that is: if there is two name in style attribute like margin-left etc. write the first name(name before hyphen) as it is while the first letter of second name should be capital so: margin-left = marginLeft margin-top = marginTop backgorund-color = backgroundColor but single word’s attribute shoud be write as it is. color = color Example:
Color: |
| « Display And Hide Div,Span Elements or HTML Elements or Tags (Use Of style.display) | Javascript Change String to Integer » |
| Posted on Tuesday, April 21st, 2009 at 2:15 pm under Javascript, Tips and tricks | RSS 2.0 Feed | |