I have no idea why id is undefined in the arrow below. Please advise. Thanks!!
<html>
<head>
<script type="text/javascript">
var id;
function window_onload()
{
id = "8888";
alert("ID = " + id);
}
</script>
</head>
<H2>Page 2</H2>
<body onload="window_ onload()">
<P>id = <script type="text/javascript">doc ument.write(id) ;</script> //<****
</body>
</html>
<html>
<head>
<script type="text/javascript">
var id;
function window_onload()
{
id = "8888";
alert("ID = " + id);
}
</script>
</head>
<H2>Page 2</H2>
<body onload="window_ onload()">
<P>id = <script type="text/javascript">doc ument.write(id) ;</script> //<****
</body>
</html>
Comment