<script language="Javascript">
function submitToNew(theForm, urls, targets)
{alert('k');
theForm.action = urls;
theForm.target = targets;
//theForm.submit();
}
</script>
<form name="form1" method="post">
<table width="90%" align="center">
  <tr>
    <td class="module_menu">
     <input type="submit" name="print" onClick="submitToNew(this.form, '1.html', '_blank');" value="打印">
</td>
  </tr>
</table>
</form>

解决方案 »

  1.   

    <script language="Javascript">
    function submitToNew(theForm, urls, targets)
    {
    theForm.action = urls;
    theForm.target = targets;
    //theForm.submit();
    }
    </script>
    <form name="form1" method="post">
    <table width="90%" align="center">
      <tr>
        <td class="module_menu">
         <input type="submit" name="print" onClick="submitToNew(this.form, '1.html', '_blank');" value="打印">
    </td>
      </tr>
    </table>
    </form>
      

  2.   

    input type="submit" //这样子默认就submit了或者改为input type=button或者不执行submit