I'm new to javascript, and I'm trying to run the following code:
<html>
<head>
<script type="text/javascript" src="script.js">
</script>
</head>
<body>
<input type="button" onclick="popup()" value="Click Me!" />
</body>
</html>
script.js:
function popup() {
alert("Hello World")
}
script.js is in the same directory as the html file, but when I push the button it doesn't execute the code.