Save the following in a file (eg. file.htm) and it works => prints out "3". But if I uncomment the line 'document.write("Hello: ");' it doesn't work anymore (prints out "0"). Anyone knows why?
<html>
<head>
<script language="JavaScript" type="text/javascript">
function display() {
//document.write("Hello: ");
document.write(document.links.length + "<br>");
}
</script>
</head>
<body onload="display()">
<A href="link0.htm">Link 0</A>
<A href="link1.htm">Link 1</A>
<A href="link2.htm">Link 2</A>
</body>
</html>