你的this不代表form代表td
return datainit(document.all.fm)或者return datainit(document.forms[0])

解决方案 »

  1.   

    在fm.action那句后面加上fm.submit试试,也可能是fm.submit()
      

  2.   

    不能为_self
    换一个随便哪儿个名字都行
    而且那个THIS返回了BUTTON哦不是表单哦
      

  3.   

    如果你想提交表但的话不就这样做吧。
    <script>
    function datainit()
    {  
    var fm = document.forms["fm"];
    var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!");
       if (TrueID){
    window.open("","test");
    fm.target = "test";
    fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>";
    fm.submit();
    }else { return false;}
      }
    </script>
    datainit(fm)好象没有响应,其他的也是如此操作的,需要传递参数。<form method="post" name="fm">  
      <table width="409" border="0" >
           </tr>
        <tr align="center"> 
          <td width="212" height=30 align="center">&nbsp; <input type="button" name="button_init" value=" 操作1 " onclick="return datainit()"></td>
          <td width="187" height=30 align="center">&nbsp; <input type="button" name="button_" value="  操作2  " onclick=""></td>  </tr>
     <tr>  <td height=30 align="center">&nbsp; <input type="button" name="button_print" value="操作3"  onclick=""></td>
          <td height=30 align="center">&nbsp; <input type="button" name="button_print" value="操作4" onclick=""></td>    </tr>
    <tr><td height=30 colspan="2" align="right">&nbsp; <input type="button" name="button_close" value="关闭窗口" 
    onclick="javascript:window.close();" ></td>
        </tr>
      </table>
     </form>
    不知道你是不是这个意思
      

  4.   

    <script>
    function datainit(fm)
    {  var TrueID=window.confirm("确定要进行操作1吗?如果出错后果严重哦!");
       if (TrueID){
        window.open("","_self");
    fm.target = "_self";
    fm.action = "datainit.asp?ProCode=<%=b%>&user_id=<%=user_id%>&select=<%=Sdate%>";
    document.fm.submit();
    }else { return false;}
      }
      </script>
    <form method="post" name="fm" >  
      <table width="409" border="0" >
           </tr>
        <tr align="center"> 
          <td width="212" height=30 align="center">&nbsp; <input type="button" name="button_init" value=" 操作1 " onclick="return datainit(this)"></td>
          <td width="187" height=30 align="center">&nbsp; <input type="button" name="button_" value="  操作2  " onclick=""></td>  </tr>
     <tr>  <td height=30 align="center">&nbsp; <input type="button" name="button_print" value="操作3"  onclick=""></td>
          <td height=30 align="center">&nbsp; <input type="button" name="button_print" value="操作4" onclick=""></td>    </tr>
    <tr><td height=30 colspan="2" align="right">&nbsp; <input type="button" name="button_close" value="关闭窗口" 
    onclick="javascript:window.close();" ></td>
        </tr>
      </table>
     </form>
      

  5.   

    window.open("","_self");
     这句不要也可以!