topical media & game development
#javascript-code-26-createtextnode.js / js
// Create a new <h1> element
var h = document.createElement(“h1”);
// Create the header text and add it to the <h1> element
h.appendChild( document.createTextNode(“Main Page”) );
// Add the header to the start of the <body>
document.body.insertBefore( h, document.body.firstChild );
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.