不要传参数,直接通过
if(document.form1.input1.value == ...)
if(document.form1.input2.value == ...)
写函数内容

解决方案 »

  1.   

    onsubmit = "return checkEmpty(txt1,'姓名')&&checkEmpty(txt2,'密码');"
    不行么?
      

  2.   

    <form ... onsubmit="if (checkEmpty(text1,'text1')==false) return false; else if (checkEmpty(text2,'text2')==false) return false; else return true;">
      

  3.   

    应该不会的吧,如果前半部分已经判断是false应该直接返回而不会做后一个判断的吧。
      

  4.   

    mjpclab(我是大猫猫啊 )的行了~~山的不行~~谢谢`~~大家~~还要讨论么
    我结贴了~~
      

  5.   

    sorry,大山兄的也行~~呵呵`~谢谢结了
      

  6.   

    应该这样
    onsubmit="if (checkEmpty(text1,'text1')){ if (checkEmpty(text2,'text2'){return true}else{return false; }}else{return false;}">
      

  7.   

    看看这.http://community.csdn.net/Expert/topic/3302/3302676.xml?temp=9.843081E-02