JQuery提交表单

来源:互联网 发布:软件测评高级工程师 编辑:程序博客网 时间:2024/05/21 22:49
function query(url, id) {
var str = $('#_' + id).val();
var temp = document.createElement("form");
temp.action = url;
temp.target = "_blank";
temp.method = "post";
temp.style.display = "none";
var opt = document.createElement("textarea");
opt.name = "target";
opt.value = str;
temp.appendChild(opt);
document.body.appendChild(temp);
temp.submit();
}
0 0
原创粉丝点击