JavaScript Reference/Javascript Properties/nodeValue
Содержание
"nodeValue" Example
<source lang="javascript">
<html> <body> <script language="JavaScript"> function function4() {
alert(document.all.myNodeOne.childNodes(0).nodeValue);
} </script>
This PARAGRAPH has two nodes, Node One, and Node Two.
<button onclick="function4();">Node One Value</button> </body> </html>
</source>
"nodeValue" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> attribute | | | <base> | | |<basefont> | | |<bgsound> |
| |<body> || |
| |
<button> || | |
| |<dir>| | |<col> <colgroup> | | |<comment>
| | | || | |
- | | | <embed> | | |<fieldset> | | |<form> <frame> | | |<frameset> <head> | | |<hn>
|| |<html> | | |<iframe> <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="hidden"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <isindex> | | | <label> |
| |<legend>- | | |<link> <listing> | | |<map> <marquee> | | |<menu> <meta> | | |<noframes> <noscript> | | |<object>
| | |<optgroup> <option> | | |
<param> | | |<plaintext>
| | || | | <script> | | |<select> | | || | | <style> | | | | | |<tbody> | | |
<textarea> | | |textNode <tfoot> |
| |<thead> | | |<title> | | | | | | | | |<xmp> | +----------------+--------------------------------------------------------------+ </source>
"nodeValue" Possible Values
<source lang="javascript"> Possible Values For a text node, the value is the text string. For an attribute node, the value is the attribute"s value. For an element node, the value is null.
</source>
"nodeValue" Syntax and Note
<source lang="javascript"> Note: Read-only property. Returns the node value.
Syntax:
document.getElementById("elementID").nodeValue document.all.elementID.nodeValue // IE only
</source>