Skip to content

Instantly share code, notes, and snippets.

@mojaray2k
Created June 16, 2013 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mojaray2k/5792725 to your computer and use it in GitHub Desktop.
Save mojaray2k/5792725 to your computer and use it in GitHub Desktop.
Add a event handler in native javasceipt
//addEventListener.js
var mynode = document.querySelecter("#submitButton");
mynode.addEventListener('click', function(){
}); //add }, false) if you don't want the event to bubble
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment