Если кто-то может объяснить это поведение, это было бы потрясающе!
Код: Выделить всё
/*
** Augie Luebbers & Toni Rigolosi
** Group 15
*/
//Take the button in our html and store it as a variable.
var runButton = document.getElementById('run-button');
//Create an event listener for the aforementioned button.
runButton.addEventListener('click', doWork, false);
/*
** For some reason when we created this second event
** beacuse without it, it was returning null value
** because it executed before the DOM fully loaded.
** More info: https://stackoverflow.com/q/35644863 , http://stackoverflow.com/q/26107125
Lab 3: Metronome
Metronome
BPM
Start
SELECTION
Method 1
Method 2
Submit
3
4
Change Beat
BEATS
Change Beat
One
Two
Three
Four
Подробнее здесь: https://stackoverflow.com/questions/357 ... ript-event
Мобильная версия