The following code does not work. Is it something wrong?


Code HTML4Strict:
<html>
<body>
 
<div></div>
<div></div>
<div></div>
<span></span>
<span></span>
 
 
<script type="text/javascript">
 
var i = document.getElementsByTagName("div");
var j = document.getElementsByTagName("span");
i = i.concat(j) ;
 
alert(i.length);
 
</script>
 
 
</body>
</html>