标签:
看UI
<form action="" name="">
<input type="submit" value="查询" />
<input type="button" id="down" value="下载" />
</form>
js:
$("#down").click(function () {
var form = document.forms[0]; //获取表单
var oldaction = form.action; //获取老路径
form.action = "/zsgl/down"; //传递新路径
form.method = "post";
form.target = "_blank";
form.submit();
form.action = oldaction; //返回老路径
})
标签:
原文地址:http://www.cnblogs.com/0to9/p/5260818.html