vbscript问题,急啊
<script language=vbscript>
<!--
sub tijiao_onclick()
if (zhuce.nikname.value="") then
alert("请输入用户名")
exit sub
end if
zhuce.submit
end sub
-->
</script>
按道理如果用户不填写不应该提交的,可是为什么还是提交了呢。
参考答案:<script language=vbscript>
<!--
sub tijiao_onclick()
if (zhuce.nikname.value="") then
alert("请输入用户名")
else
zhuce.submit
end if
end sub
-->
</script>
<body>
<form name="zhuce" method="post" action="ere.html">
<input type="text" name="nikname">
<input type="button" name="tijiao" value="提交">
</form>
象我一样就行,<input type="button" name="tijiao" value="提交">
type不等于submit