在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()'  >

解决方案 »

  1.   

    没做过这样的
    个人觉得这样提交应该是不行的!
    如果没有传值,单纯跳转应该可以!
    不过,首先你要确定你的服务器要同时支持jsp,asp
      

  2.   

    function go(){
      var ddbh=theForm.ddbh.value;  if (jtrim(ddbh)=="")
      {alert("定单编号不能为空!");
      theForm.ddbh.focus();
      return false;
      }
      theForm.action="a.asp";
      theForm.submit();
    }
      

  3.   

    我现在其实想实现这样的功能,有三个text:text1、text2、text3,我想在text1输入编号后通过onblur事件,来查询数据库。查询出相关的数据项后显示在text2、text3中。  请问用什么方法好呢??