JavaScript Reference/Javascript Properties/type textarea — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:21, 26 мая 2010
"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>