asp.net.ph

Skip Navigation Links

data Property

DHTML Object Properties   DHTML Objects


Sets or retrieves the TextNode object data.

Syntax


HTML N/A
Script [ sData = ] object.data

Possible Values


sData Value of the TextNode.

The property is read/write with no default value.

Example

The following sample demonstrates the use of the data object property to dynamically set the value of a text node.

<script language="JavaScript">
function fnChangeValue ( ) {
var oNode = oList.firstChild.childNodes ( 0 );
var oNewText = document.createTextNode ( );
oNewText.data="Create Data";
oNode.replaceNode ( oNewText );
oNode.data = "New Node Value";
}
</script>

<ul ID = oList onclick = "fnChangeValue ( )">
  <li>
  <li>Start Here
</ul>
Applies To

TextNode



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note