textDecoration property I
used in an earlier example represents a CSS property that is normally
hyphenated, like this:
mathematical operator, whenever you access a hyphenated CSS property you
must omit the hyphen and set the character immediately following it to
Another example of this is the
font-size property, which is referenced in
fontSize when placed
after a period operator, like this:
myobject.fontSize = '16pt'
An alternative to this is to be more long-winded and use the
setAttribute function, which does
support (and in fact requires) standard CSS property names, like
Some versions of Microsoft Internet Explorer are picky in certain
applying the browser-specific
-ms--prefixed versions of the rules. If you
encounter this, use the
function and you should be all right.
web document, in a similar manner to using CSS. I have already shown you
setAttribute function (to use exact CSS property names). Therefore, I won’t bore you by detailing all of these hundreds of properties. Rather, I’d like to show you how to access just a few of the CSS properties ...