Multiple Actions in Java Script

  • How do you have an event handler call multiple functions/statements?
  • That's simple. You just need to embed the functions inside the event handler as usual, but separate each of them using a semicolon:

    <form>
    <input type="button" value="Click here!" onClick="alert('Thanks for visiting my site!');
    window.location='http://www.yahoo.com'">
    </form>

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger