| Comments | HTML source | display in your current browser |
|---|---|---|
<script type="text/javascript">
function goupdate() {
var obj=document.getElementById("name1");
var nodes=obj.childNodes; //NodeList
var textNode=nodes.item(0); //TextNode
textNode.nodeValue="Name changed";
return false;
}
</script>
<a href="#" onclick="javascript:goupdate();return false;">Click to change the text below</a>
<p/>
<fond id="name1">John</font>
|
Click to change the text below
|