JavaScript Reference/Javascript Properties/type textarea

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

"type" Example

   <source lang="javascript">
   

<html> <head> <script language="JavaScript"> function function1() {

   alert("The "myElem" element has a type value of:\n"+myElem.type); 

} </script> </head> <body> <textarea name="myElem" cols="20" rows="8"> </textarea> <input type="button" value="Click here" onClick="function1();"> </body> </html>


     </source>
   
  


"type" is applied to

   <source lang="javascript">

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

     </source>
   
  


"type" Syntax and Note

   <source lang="javascript">

Note: Read-only property. Returns the type of input element.

Value: textarea.

Syntax:

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


     </source>