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.

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

Resize the window so that you see both vertical and horizontal scrollbars in the<br />

browser window and click the Evaluate button again. If either or both numbers get<br />

smaller, the values in the Results box are the exact size of the space occupied by<br />

the document. But if you expand the window to well beyond where the scrollbars<br />

are needed, the values extend to the number of pixels in each dimension of the window’s<br />

content region.<br />

images<br />

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

Compatibility ✓ ✓ ✓ (✓) ✓ ✓ ✓<br />

Example<br />

The document.images property is defined automatically as the browser builds<br />

the object model for a document that contains image objects. See the discussion<br />

about the Image object in Chapter 22 of the <strong>JavaScript</strong> <strong>Bible</strong> for reference examples.<br />

implementation<br />

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

Compatibility ✓<br />

Example<br />

Use The Evaluator (Chapter 13 in the <strong>JavaScript</strong> <strong>Bible</strong>) to experiment with the<br />

document.implementation.hasFeature() method in NN6. Enter the following<br />

statements one at a time into the top text field and examine the results:<br />

document.implementation.hasFeature(“HTML”,”1.0”)<br />

document.implementation.hasFeature(“HTML”,”2.0”)<br />

document.implementation.hasFeature(“HTML”,”3.0”)<br />

document.implementation.hasFeature(“CSS”,”2.0”)<br />

document.implementation.hasFeature(“CSS2”,”2.0”)<br />

Feel free to try other values.<br />

lastModified<br />

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

Compatibility ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓<br />

235<br />

document.lastModified

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

Saved successfully!

Ooh no, something went wrong!