高手请进,问题很简单,可是突然遇到~谢谢~
我在本页面用javascript判断 是否为空,在form中是这样的:
<form name="form1" method="post" action="yulan.asp" onSubmit="return check()">
然后check函数是这么写的:
function check(theform)
{
theform=document.form1
var userid=theform.userid
if(userid.value=="")
{
alert("请输入您注册的帐号!")
userid.focus()
return false
}
}
在执行的时候本来已经提示 请输入您注册的帐号 但是没有 return false 停止,为什么呢?仍然跳到 yulan.asp 页面,为什么?