在text中调用onblur事件,onblur事件调jsp函数,下面的不对地方???function go(){
var ddbh=theForm.ddbh.value; if (jtrim(ddbh)=="")
{alert("定单编号不能为空!");
theForm.ddbh.focus();
return false;
theForm.action="a.asp"}
}<input name='ddbh' class=input id='1' size='20' tabindex='1' onblur='go()' >
var ddbh=theForm.ddbh.value; if (jtrim(ddbh)=="")
{alert("定单编号不能为空!");
theForm.ddbh.focus();
return false;
theForm.action="a.asp"}
}<input name='ddbh' class=input id='1' size='20' tabindex='1' onblur='go()' >
个人觉得这样提交应该是不行的!
如果没有传值,单纯跳转应该可以!
不过,首先你要确定你的服务器要同时支持jsp,asp
var ddbh=theForm.ddbh.value; if (jtrim(ddbh)=="")
{alert("定单编号不能为空!");
theForm.ddbh.focus();
return false;
}
theForm.action="a.asp";
theForm.submit();
}