<SCRIPT>
function fnChangeValue(oList, iItem, sValue){
// only perform the operation on lists
if (oList.nodeName != "UL" && oList.nodeName != "OL")
return false;
// only perform the operation if the specified index is
// within the acceptable range of available list items
if (iItem > oList.childNodes.length -1)
return false;
// get a reference to the specified list item
var oLI = oList.childNodes(i);
if (!oLI)
return false;
// get a reference to the text node contained by the list item
var oText = oLI.childNodes(0);
// ensure that the node is a text node
if (oText.nodeType != 3)
return false;
oText.nodeValue = sValue;
return true;
}
</SCRIPT>
<UL ID="oList" >
<LI>Old Node Value
</UL>