level 1
cnng2007
楼主
<html>
<script language="vbscript">
function CheckNow(event)
alert("aaa")
end function
</script>
<body>
<form id="form1" action="a.html">
<textarea id="txa1" rows="5" cols="5">1234567890</textarea><br />
<textarea id="txa2" rows="5" cols="5">1234567890</textarea><br />
<input type="button" id="BtnCheck" value="检查" onClick="CheckNow(event)" />
<span id="span1"></span>
</form>
</body>
</html>
为什么上面的代码点击“检查"后,直接会报错:
ReferenceError: CheckNow is not defined
?
2013年11月25日 10点11分
1
<script language="vbscript">
function CheckNow(event)
alert("aaa")
end function
</script>
<body>
<form id="form1" action="a.html">
<textarea id="txa1" rows="5" cols="5">1234567890</textarea><br />
<textarea id="txa2" rows="5" cols="5">1234567890</textarea><br />
<input type="button" id="BtnCheck" value="检查" onClick="CheckNow(event)" />
<span id="span1"></span>
</form>
</body>
</html>
为什么上面的代码点击“检查"后,直接会报错:
ReferenceError: CheckNow is not defined
?