I have this code and it doesn't seem to alert the fact that I'm pressing a key (this should happen after I click Start). Why? :/
And here's the "whole" code: code
Code:
function dynamic_buttons() {
var start_button = document.getElementById('start');
var stop_button = document.getElementById('stop');
start_button.onclick = log_keypress;
stop_button.onclick = log_keypress;
}
function log_keypress() {
alert('click event happened');
}
Comment