function onexplode() 

if(confirm("要导出EXCEL吗?"))
{
document.form1.action.value="daochu.php";
document.form1.method.value="GET";
document.form1.submit();
}} 
我这样发不过去,而且页面变量也传不过去

解决方案 »

  1.   

    <title>无标题文档</title>
    <script type="text/javascript">
    function change(){
    var a=document.forms[0];
    a.action="http://www.baidu.com/s";
    a.method="get";
    a.submit();
    }
    </script>
    </head><body>
    <form action="" method="post">
    <input type="text" name="wd">
    <input type="button" id="test" onclick="change()">
    </form>
    </body>
    </html>
    这样试试
      

  2.   

    <title>无标题文档</title>
    <script type="text/javascript">
    function change(){
    var a=document.forms[0];
    a.action="http://www.baidu.com/s";
    a.method="get";
    a.submit();
    }
    </script>
    </head><body>
    <form action="" method="post">
    <input type="text" name="wd">
    <input type="button" id="test" onclick="change()">
    </form>
    </body>
    </html>
      

  3.   

    a.action="http://www.baidu.com/s";
    这行
      

  4.   

    1 请确定form1是否是你form的name
    2 赋值直接 属性= 就行不用.value
    3 submit是否在页面标签内有重名的 请修改
      

  5.   

    function onexplode() 

    if(confirm("要导出EXCEL吗?"))
    { var send=document.forms[0];
    send.action="http://www.baidu.com/";
    send.method="get";
    send.submit();
    }} <form name="form1" action="xxx.php" method="get" onsubmit="return do_check()" target="_blank">这是我的FORM
    里边有个按钮:
    <input type="button" name="export" value="导 出" class="button" onclick="onexplode();">
    </form>
      

  6.   

    直接发送,应该是弹出百度这个页面,是吧
    我要的就是这样的,我要让他直接发送值到file.php
      

  7.   

    我发现是这个:<input type="hidden" name="action" value="user" >里有个隐藏的表单名是action,我给去掉就好了.但是不能去,
      

  8.   

    我这是模版,我试了下把action=user放在
    <form name="form1" action="xxx.php?action=user"  就影响了原来的页面不能发送,找不到action这个值了
      

  9.   

    <form name="form1" action="xxx.php" method="get" onsubmit="return do_check()" target="_blank"> <input type="hidden" name="action" value="user" >

    <input type="hidden" name="export">
    <tr> <td height="21" class="maintd" colspan="2" bgcolor="#D1DCEB"> <input type="submit" value=" 查 看 明 细 " class="button">&nbsp;
    <input type="button" name="export" value="导 出" class="button" onclick="onexplode();"> <input type="checkbox" name="is_like" checked>模糊查找 </td>      </tr>     </form>