onload事件会覆盖其他脚本
小弟我刚学javascript,今日有不明白的地方,望大家指教,代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
<!--
function done()
{
document.write("OnLoad event has finished.");
}
//-->
</script>
</head>
<body onload="done()">
<script language="javascript">
<!--
document.write("aljfdal");
//-->
</script>
</body>
</html>
显示的结果是:OnLoad event has finished.而
<script language="javascript">
<!--
document.write("aljfdal");
//-->
</script>
好象没有运行一样,显示不出来,百思不得其解,望大家给予指点.
在线等...