Using Buttons in JavaScript
- Console message for debug
- Constants
- Add Events listeners to DOM Elements
- functions
We have two elements with Id in the HTML, the button and a div to display a message.
In our JavaScript file we grab a reference to elements in the HTML. We add a function to the Click event of the button.
Sample:
http://javascript.kennyming.com/code/2-buttons-in-javascript/
Code:
https://github.com/kennymingt/javascript/tree/master/code/2-buttons-in-javascript
Comments
Post a Comment