hvad var fidusen lige ved addEventListener() ?
Jeg troede fidusen var at man kunne ligge addEventListener i <head>...Så kan jeg bedre forstå hvorfor det ikke fungerer for mig...
<!DOCTYPE html>
<html>
<body>
<p>This example uses the addEventListener() method to attach a click event to the document.</p>
<p>Click anywhere in the document.</p>
<p><strong>Note:</strong> The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.</p>
<p id="demo"></p>
<script>
document.addEventListener("click", function(){
document.getElementById("demo").innerHTML = "Hello World!";
});
</script>
</body>
</html>