JavaScript Reference/Javascript Properties/value textarea

Материал из Web эксперт
Перейти к: навигация, поиск

"value" Example

    
<html>
<head>
<script language="JavaScript">
    function function1() {
        alert(myTextArea.value); 
    }
</script>
</head>
<body onload="function1();">
    <textarea id="myTextArea">textarea value</textarea>
</body>
</html>



"value" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<textarea>                                                    |
+----------------+--------------------------------------------------------------+



"value" Syntax and Note

Note:
Read-only property. 
The element text.
    
Syntax:
    
document.getElementById("textareaID").value
document.all.textareaID.value // IE only