js构建form进行post提交

时间:2014-07-16 23:59:51   收藏:0   阅读:478

//构建post方式提交
var form = document.createElement("form");
form.action = "conditionSearch.action";
form.method = "POST";
form.style.display = "none";
//构建input并附加参数
//查询条件
var conditionText = document.createElement("input");
conditionText.setAttribute("name", "${name}");
conditionText.setAttribute("type", "text");
conditionText.value="${value}";

form.appendChild(conditionText);

document.body.appendChild(form);

form.submit();

js构建form进行post提交,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!