JavaScript Reference/Javascript Properties/data TextNode
Версия от 18:30, 25 мая 2010; (обсуждение)
"data" Example
<html>
<body>
<script language="javascript">
function function1(){
var myText = document.createTextNode();
myText.data="Data Property for textNode";
alert(myText.data);
}
</script>
<button onclick="function1();">View Node Value</button>
</body>
</html>
"data" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |TextNode |
+----------------+--------------------------------------------------------------+
"data" Syntax and Note
Note:
Read and write property.
Sets the string content for text node.
Syntax:
textNodeName.data = value