style.float?
Today I want to change the CSS float property of the inline style of an element programatically using style.float
. I found that it has no effect. By alerting the innerHTML property, I found that the inline style is not set at all!
After googling, I found that since float is a reserved word in JavaScript/ECMAScript, one need to use style.cssFloat
. And Internet Explorer, unsurprisingly, requires one to use style.styleFloat
instead.
Anyway, problem solved. :-)
3 Comments:
Note that troll and spam comments will be deleted without any notification.
At 1/04/2007 09:51:00 pm, Cave Editor said…
Are you still out there in cyberspace?
Linda
At 1/04/2007 10:54:00 pm, minghong said…
Sure! It's just that I don't have any incentive to blog… :-P
At 8/12/2019 05:55:00 pm, Eagle Focus(Hong Kong) Limited said…
nice post
Post a Comment
<< Home