Changing DOM content

This is the one and only one line of text on this page.



Java Script Code:
In header of the file:
<SCRIPT LANGUAGE="JavaScript">
<!--
function change() { var newPar = document.createElement("P") newPar.id = "newP" var newText = document.createTextNode("This is a text in a new paragraph, that was created by JavaScript.") newPar.appendChild(newText) document.body.appendChild(newPar) document.getElementById("strong1").childNodes[0].nodeValue = "first " } //!-->

Back to Java script list


Back to main page