Thursday, January 10, 2019

html - How to make Event Listeners work with external Javascript File?

I have these simple files -






document.getElementById("btn2").addEventListener("click",function(){
alert("Did it work?");
});















which work correctly here and also on jsFiddle, but when I run this on my computer locally, the EventListener won't work! I've been trying to fix this all day and no success. What is the problem? I just cannot seem to figure it out!

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...