注册 登录
编程论坛 J2EE论坛

[求助]请问为什么会报错?请大家帮帮忙

lihaoru 发布于 2005-10-14 13:09, 730 次点击
我在imdex.asp页面下写了这些语句:
<script language="javascript" type="text/JavaScript">
function openwin()
alert("111");
</script>
<input type="button" name="all" value="详 细" style="WIDTH: 106px" title="查看详细信息"  onClick="JavaScript:openwin();">
为什么点button的时候会报错说缺少对象
请大家帮帮忙

[此贴子已经被作者于2005-10-14 13:11:32编辑过]


2 回复
#2
jeremydomett2005-10-14 14:32

<script language="javascript" type="text/JavaScript"> function openwin() { alert("111"); } </script> <input type="button" name="all" value="详 细" style="WIDTH: 106px" title="查看详细信息" onClick="JavaScript:openwin();">

这样。

#3
xiaopangod2005-10-19 19:09
我同意楼上的,你的函数体怎么可以没有  { }  呢?
1