I have these simple files -
document.getElementById("btn2").addEventListener("click",function(){
alert("Did it work?");
});
<html>
<head>
<title></title>
<script type="text/javascript" src="myevents.js"></script>
</head>
<body>
<button id="btn2">Please Work!</button>
</body>
</html>
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!