powersearch是form么?改成下面看看
   
<script language="javascript">
function submitform() {
     document.powersearch.action="leave_list.jsp";
         alert('dfgsdfgsdfg');
  document.powersearch.submit();
}
</script> 
 

解决方案 »

  1.   

    有可能:
    powersearch不是表单的name(写成ID了)
    有多于一个叫powersearch的对象
    浏览器禁止了表单重定向
    代码在哪里?
      

  2.   

    你的form里是否使用了onsubmit="return .."?
    如果有就去掉
      

  3.   

    没有
    <form name="powersearch" method="post" action="leave_view.jsp">
      

  4.   

    我试了没有问题的啊。<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title></title>
    </head>
    <body><form  name="powersearch" action="abc">
    <input >
    </form><button onclick="submitform()">test</button><script language="javascript">
    function submitform() {
         document.powersearch.action="leave_list.jsp";
    document.powersearch.submit();
            alert('dfgsdfgsdfg');
    }
    </script></body>
    </html>你的form里面是不是没有写初始的action?
      

  5.   

    form里面可以不用写初始的action,默认为提交到本页。
    请把你的全整的代码(既form中的内容帖出来)
      

  6.   


    这是另外一个例子,点击button_add也没反应
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <link rel="stylesheet" href="../style.css" type="text/css">
    </head>
    <Script language="JavaScript">
    <!--
    function button1_click()
    {
     document.query.action="group_end.jsp";
      if (inputTextCheck('组名要填写:',query.groupName)==true )
         document.query.submit();}
    function button2_click()
    {
     document.query.action="group_sav.jsp";
       if (inputTextCheck('组名要填写:',query.groupName)==true )
     document.query.submit();
    }
    function button3_click()
    {
     document.query.action="group_delet.jsp";
     document.query.submit();
    }
    //-->
    </Script>
    <br>      <form name="query" method="post" action="group_sav.jsp">
              
    <table style={width="98%"} border="0" cellspacing="0" cellpadding="0" align="center" height="1">
      <tr> 
        <td class=bgcolor1 ></td>
      </tr>
    </table>
    <br>
    <br>
    <table border="0" width="100%" align="center">
        <tr class="trLine1_1"> 
          <td align="right" > <span class=text>类别:</span></td>
          <td width="55%" > 
            <select name="className">
                <option  value="1">内部</option>
                <option  value="0">外部</option>
              </select>
          </td>
        </tr>
        <tr class="trLine1_1"> 
          <td align="right" > <span class=text>组名:</span></td>
          <td width="55%" > 
            <input type="text" name="groupName" size="16" >
          </td>
        </tr>
        <tr class="trLine1_1"> 
          <td align="right" > <span class=text>备注:</span></td>
          <td width="55%" > 
            <textarea name="groupNote" cols="23" rows="10" wrap="VIRTUAL"></textarea>
          </td>
        </tr>
    <input type="hidden" name="add" value="ad">
        <tr> 
          <td align="right">&nbsp;</td>
          <td width="55%" height="50" align="right"><img src="/new_image/button_add.gif"  height="20" onClick="button1_click()" style="cursor:hand"> <img src="/new_image/button_return.gif"  height="20" onClick="history.back()" style="cursor:hand"></td>
        </tr>
    </table>   
    </form></html>
      

  7.   

    你把if (inputTextCheck('组名要填写:',query.groupName)==true )去掉,试试。function button1_click()
    {
     document.query.action="group_end.jsp";
      //if (inputTextCheck('组名要填写:',query.groupName)==true )
         document.query.submit();}
      

  8.   

    你写的function inputTextCheck()在哪里?没有啊,当然出错了。