topical media & game development

talk show tell print

professional-web-02-simple-html.htm / htm

          <title>DOM Example</title>
          <h1>Page title</h1>
              Some <i>very</i> unimportant text.
          <script type="text/javascript">
              function doIt() {
  unimportantText = document.getElementsByTagName("p")[0];
  pleaseNote = document.createElement("p");
  pleaseNote.appendChild(document.createTextNode("Please note:"));
  unimportantText.parentNode.insertBefore(pleaseNote, unimportantText);
          <button onclick="doIt()">Do it</button>

(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.