Line 3: | Line 3: | ||
document.getElementById('testbutton').addEventListener('click', clickHandler) | document.getElementById('testbutton').addEventListener('click', clickHandler) | ||
− | + | function clickHandler() { | |
+ | alert('You clicked the button! Now go do something with your life.') | ||
+ | } |
Latest revision as of 14:19, 15 September 2016
'use strict'
document.getElementById('testbutton').addEventListener('click', clickHandler)
function clickHandler() {
alert('You clicked the button! Now go do something with your life.')
}