topical media & game development

talk show tell print

lib-present-course-webtechnology-slides-TurnSilver.htm / htm



  <!DOCTYPE html 
          PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  <html xmlns="http://www.w3.org/1999/xhtml">
    <head> 
      <title>
       Turn Silver
      </title> 
      <script type="text/javascript">
  
  function goSilver(ev) { 
          document.body.style.backgroundColor = "silver";
  }
          
  function print_event(ev){
          pre1 = document.getElementById("pre1");
          for (var prop in ev) { 
            n = document.createTextNode(prop + ":" + ev[prop] + "\n");
            pre1.appendChild(n);          
          }
  }
      </script>
    </head> 
    <body>
  
     <script type="text/javascript">
  
  document.body.addEventListener(   "click", goSilver,    false); 
  document.body.addEventListener("dblclick", print_event, false);
      </script>
  
      <p>Click me</p>
      <hr/>
      <pre id="pre1"></pre>
    </body> 
  </html> 
  


(C) Æliens 20/08/2009

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.