Wednesday, 24 May 2017

javascript - HTML : Unable to execute code in block, but able to run in console




Here is my code :















It is simple, but I can't get it to work.



When I copied the code inside




2)




window.onload = function () {
document.getElementById("id").onclick = function(){
alert();
}
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...