function onexplode()
{
if(confirm("要导出EXCEL吗?"))
{
document.form1.action.value="daochu.php";
document.form1.method.value="GET";
document.form1.submit();
}}
我这样发不过去,而且页面变量也传不过去
{
if(confirm("要导出EXCEL吗?"))
{
document.form1.action.value="daochu.php";
document.form1.method.value="GET";
document.form1.submit();
}}
我这样发不过去,而且页面变量也传不过去
解决方案 »
- 为什么这段JS代码在IE中能显示图片,而火狐和谷歌浏览器不显示?
- 使用jquery显示新插入资料内容遇到的问题,寻求帮助。
- 如何控制input的输入格式为,"***********.**" 其中*为数字且最多能输入11个数字
- javascript的动态添加function问题!!!高手进@@@@@@
- XMLHttp 读取流!!
- iframe中如何能够跨域访问DOM对象
- 为何我的对联广告点击关闭后页面中其他的GIF动画都不播放了?
- 应如何判读浏览器是否支持 javascript ?
- 如何用javascript控制选择单选框?
- 谁有点击一个链接就出现一个框的提示文字的代码
- 在请教正则问题
- 如何做到 输入网址就可以播放YOUKU\土豆、新浪的视频。。
<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>
这样试试
<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 赋值直接 属性= 就行不用.value
3 submit是否在页面标签内有重名的 请修改
{
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>
我要的就是这样的,我要让他直接发送值到file.php
<form name="form1" action="xxx.php?action=user" 就影响了原来的页面不能发送,找不到action这个值了
<input type="hidden" name="export">
<tr> <td height="21" class="maintd" colspan="2" bgcolor="#D1DCEB"> <input type="submit" value=" 查 看 明 细 " class="button">
<input type="button" name="export" value="导 出" class="button" onclick="onexplode();"> <input type="checkbox" name="is_like" checked>模糊查找 </td> </tr> </form>