15.02.2013 Views

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1 ✦ Generic HTML Element Objects (Chapter 15)<br />

Control Panel<br />

<br />

”Bubble”-type click listener:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

”Capture”-type click<br />

listener:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Examine click event characteristics:&nbsp;<br />

<br />

<br />

<br />

<br />

<br />

appendChild(elementObject)<br />

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

Compatibility ✓ ✓ ✓<br />

Example<br />

Scripts in Listing 15-21 demonstrate how the three major child-related methods<br />

work in IE5+ and NN6. The page includes a simple, two-item list. A form enables you<br />

to add items to the end of the list or replace the last item with a different entry.<br />

55<br />

elementObject.appendChild()

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

Saved successfully!

Ooh no, something went wrong!