Issue with document.getElementById accessing HEAD id = "head"
4 answers
<html>
<head id="head">
<script type="text/javascript" src="jquery-1.3.1.min.js" ></script>
</head>
<body>
<script type="text/javascript">
alert(document.getElementById("head"));
</script>
</body>
</html>
works great in firefox. but if you script is in header and runs automatically, it cannot work as header is not fully loaded
+1
source to share