JS高手帮忙,一个表单提交多个Action传递参数的有关问题
JS高手帮忙,一个表单提交多个Action传递参数的问题。
document.getElementById("form1").action="<%=path%>/test.do?id=${m.CDNID}&command=queryById";
现在URL后面传递不了参数 换成window.href="...." 也不行
怎么在提交的后面加上参数 ?
------解决思路----------------------
<form method="post">
</form>
form里的method一定要写成post,必须要写,你不写的话默认的是get请求,所以后台request.getRequestUrl根本获取不到。
function delcfm(name) {//删除
document.getElementById("form1").action="<%=path%>/test.do?command=dele&ck=12";
document.getElementById("form1").submit();
return true;
}
function modifycfm(name) {//修改
document.getElementById("form1").action="<%=path%>/test.do?id=${m.CDNID}&command=queryById";
document.getElementById("form1").submit();
return true;
}
document.getElementById("form1").action="<%=path%>/test.do?id=${m.CDNID}&command=queryById";
现在URL后面传递不了参数 换成window.href="...." 也不行
怎么在提交的后面加上参数 ?
------解决思路----------------------
<form method="post">
</form>
form里的method一定要写成post,必须要写,你不写的话默认的是get请求,所以后台request.getRequestUrl根本获取不到。