<script language="javascript">   function clear()
{
  document.form1.txtsellno.value=="";
  document.form1.txtcustno.value=="";
  document.form1.txtcustomer.value=="";
  }
  
</script>
js区分大小写.

解决方案 »

  1.   

    这是判断
    document.form1.txtsellno.value=="";这是赋值
    document.form1.txtsellno.value="";如果不行用
    document.all.form1.txtsellno.value="";IE浏览器里加上.all要好些
      

  2.   

    <form name="form1" action="" method="post" onSubmit="javascript:return j();">        <table width="89%" height="93" border="0" align="center" cellpadding="0" cellspacing="0">
         <tr><td width="124" height="43" align="right">订单编号:</td>
         <td width="169"><input name="txtsellno"  type="text" size="15" value=""> <td>
         <td width="216" align="left">业务员代号:
           <input name="txtcustno" type="text" size="10" value=""></td>
         <td width="76" align="left">公司简称:
                 </td>
         <td width="87" align="left"><input name="txtcustomer" type="text" size="10" value=""></td> <tr><td></td>
           <td>&nbsp; </td>
           <td><input type="SUBMIT" name="button1" value="查询"><input type="reset" name="button2" value="重设" ONCLICK ="clear():"></td>      
         </tr>
          </table>
    </form><script language="javascript">   function clear()
    {
      document.form1.txtsellno.value=="";
      document.form1.txtcustno.value=="";
      document.form1.txtcustomer.value=="";  }
      
    </script>
    ----------------
    楼主的重置按钮又不是用来提交的.不需要返回值的.
    js中return后的句子就不执行了,所以你原来的只会检查第一个input
    另外这个function和value的值是否被asp初始化,没关系.楼住包我修改的代码里在加上<%=request(...)%>可以了.我测试过了.