Thursday, 21 September 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...