topical media & game development

talk show tell print

basic-javascript-12-OB-type-property.htm / htm

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  <html xmlns="" >
      <title>Using the type Property in Other Browsers</title>
      <script type="text/javascript">
      function paragraph_eventHandler(evt) {        
          if (evt.type == "click") { //The onclick event was fired.
              alert("You Clicked Me!");
          } else if (evt.type == "mouseover") { //The onmouseover event was fired.
              alert("You Tickled Me!");
      <p onclick="paragraph_eventHandler(event)" onmouseover="paragraph_eventHandler(event)">
          Move your mouse over me. Click me, too!

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