<html>
<head>
<script type="text/javascript">
function message()
{
alert("该提示框是通过 onload 事件调用的。")
}
</script>
</head>
<body onload="message()";>
</body>
</html>本来想让它弹出一个提示框来,结果什么都没有。ie里可以看到错误:缺少对象请问哪里有问题?谢谢
<head>
<script type="text/javascript">
function message()
{
alert("该提示框是通过 onload 事件调用的。")
}
</script>
</head>
<body onload="message()";>
</body>
</html>本来想让它弹出一个提示框来,结果什么都没有。ie里可以看到错误:缺少对象请问哪里有问题?谢谢
</script>
不行你试下把<script>标签内容扔<body></body>里头。
也可以仍旧用<script type="text/javascript">,不过如果alert里面是中文的话,就有问题了。
我也不知道是什么原因。