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.

368<br />

<strong>JavaScript</strong> <strong>Examples</strong> <strong>Bible</strong>: The Essential Companion to <strong>JavaScript</strong> <strong>Bible</strong><br />

Listing 25-6 (continued)<br />

<br />

Enter any positive integer: <br />

<br />

<br />

<br />

TEXTAREA Element Object<br />

Properties<br />

cols<br />

rows<br />

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

Compatibility ✓ ✓ ✓ ✓<br />

Example<br />

Use The Evaluator to play with the cols and rows property settings for the<br />

Results textarea on that page. Shrink the width of the textarea by entering the following<br />

statement into the top text box:<br />

document.forms[0].output.cols = 30<br />

And make the textarea one row deeper:<br />

document.forms[0].output.rows++<br />

Methods<br />

createTextRange()<br />

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

Compatibility ✓ ✓ ✓<br />

Example<br />

See the example for the TextRange.move() method in Chapter 5 of this book to<br />

see how to control the text insertion pointer inside a TEXTAREA element.<br />

TEXTAREA.createTextRange ()<br />

✦ ✦ ✦

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

Saved successfully!

Ooh no, something went wrong!