I am just trying to get into the absolute basics of JS and HTML. Basically I want to execute a super simple js. Here's my test.js file:
document.getElementById("test").innerHTML = "Loaded js file";
Here's my test.html:
<!DOCTYPE HTML>
<html lang="de">
<head>
<title>Testing page</title>
<meta charset="utf-8">
<script type="text/javascript" src="test.js"></script>
</head>
<body>
<p id="test">Not loaded</p>
</body>
</html>
Both files are located in the same folder. What should happen is that the "Not loaded" text gets replaced by "Loaded js file", but it just doesn't happen. What am I doing wrong?