JavaScript Reference/Javascript Properties/value textarea

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

"value" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript">

   function function1() {
       alert(myTextArea.value); 
   }

</script> </head> <body onload="function1();">

   <textarea id="myTextArea">textarea value</textarea>

</body> </html>


     </source>
   
  


"value" is applied to

   <source lang="javascript">

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

     </source>
   
  


"value" Syntax and Note

   <source lang="javascript">

Note: Read-only property. The element text.

Syntax:

document.getElementById("textareaID").value document.all.textareaID.value // IE only


     </source>