15.02.2013 Views

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

document.body.bgProperties = “fixed”<br />

or<br />

Chapter 4 ✦ The Document and Body Objects (Chapter 18)<br />

document.body.style.backgroundAttachment = “fixed”<br />

The added benefit of using the style sheet version is that it also works in NN6.<br />

bottomMargin<br />

leftMargin<br />

rightMargin<br />

topMargin<br />

NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5<br />

Compatibility ✓ ✓ ✓<br />

Example<br />

Both of the following statements change the default left margin in IE4+:<br />

document.body.leftMargin = 30<br />

or<br />

document.body.style.marginLeft = 30<br />

leftMargin<br />

See bottomMargin.<br />

link<br />

See aLink.<br />

noWrap<br />

NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5<br />

Compatibility ✓ ✓ ✓<br />

Example<br />

To change the word wrapping behavior from the default, the statement is:<br />

document.body.noWrap = true<br />

259<br />

document.body.noWrap

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!