I\'m an experienced Java programmer but am looking at some JavaScript/HTML5 stuff for the first time in about a decade. I\'m completely stumped on what should be the simple
Probably very late to the answer but I just read this while preparing for my 70-480 exam, and found this to work -
70-480
var elem = document.getElementById('myCanvas'); elem.onclick = function() { alert("hello world"); }
Notice the event as onclick instead of onClick.
onclick
onClick
JS Bin example.