| Event Handlers/Methods/Properties | Description |
| onBlur | Called when the text area loses the focus. |
| onChange | Called when the text area loses the focus and has had its value modified. |
| onFocus | Called when the text area receives the focus. |
| onKeyDown | Called when a key is pressed down. This occurs before an onKeyPress event handler is triggered. |
| onKeyPress | Called when a key is pressed down immediately after an onKeyDown event handler is triggered. |
| onKeyUp | Called when a key is released. |
| onSelect | Called when a user selects some of the text within the text area. |
| blur() | Removes the focus from the text area. |
| focus() | Gives the focus to the text area. |
| handleEvent() | Invokes the handler for the event specified. |
| select() | Selects the text in the text area. |
| defaultValue | Returns the value of this text area defined between the beginning and ending |
| form | Returns the entire form the text area is in. |
| name | Returns the name of this text area specified by the NAME attribute. |
| type | Returns the type of this text area. Note that this is always textarea. |
| value | Returns the value that is actually displayed in the text area. |
<html>
<head>
<script language="JavaScript">
<!--
function openWin(){
var myInstance = document.myForm.myTextArea;
var myWin = open("", "","width=450,height=200");
myWin.document.write("The defaultValue is: " + myInstance.defaultValue + "<br>");
myWin.document.write("The name is: " + myInstance.name + "<br>");
myWin.document.write("The type is: " + myInstance.type + "<br>");
myWin.document.write("The value is: " + myInstance.value + "<br>");
myWin.document.write(myInstance.form.myButton.value);
myWin.document.close();
}
-->
</script>
</head>
<body>
<form name="myForm">
<textarea name="myTextArea" rows=6 cols=50>
Here is some text in my text area.
</textarea>
<input type=BUTTON value="Click to Process" name="myButton" onClick="openWin()">
</form>
</body>
</html>
| 10.16.TextArea | ||||
| 10.16.1. | Textarea | |||
| 10.16.2. | Textarea.blur() | |||
| 10.16.3. | Textarea.defaultValue | |||
| 10.16.4. | Textarea.focus() | |||
| 10.16.5. | Textarea.form | |||
| 10.16.6. | Textarea.handleEvent() | |||
| 10.16.7. | Textarea.name | |||
| 10.16.8. | Textarea.onBlur | |||
| 10.16.9. | Textarea.onChange | |||
| 10.16.10. | Textarea.onFocus | |||
| 10.16.11. | Textarea.onKeyDown | |||
| 10.16.12. | Textarea.onKeyPress | |||
| 10.16.13. | Textarea.onKeyUp | |||
| 10.16.14. | Textarea.onSelect | |||
| 10.16.15. | Textarea.select() | |||
| 10.16.16. | Textarea.type | |||
| 10.16.17. | Textarea.value | |||