It should be easy, but as easy as it should be I can't solve the problem.
If I'm typing the following HTML and JS code into an online editor, everything works fine but if I'm typing this into my (offline) editor it won't work. Here's the online code: http://jsbin.com/kenurunahu/1/edit?html,js,output)
I bet it has something to do with the loading order and how the files are linked.
Thats how my (lokal) HTML-file looks like (where the files are linked):
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" content="Index.css">
<script src="Script.js"></script>
</head>
<body>
<p id="demo">
something
</p>
</body>
</html>
Many Thanks for Help!
[Update] Firefox and Chrome display the JS file. Sometimes I get an error message that says 'innerHTML is null', but if I write the same code into the console everything works fine.
Script.jsat the same level as yourhtmlfile