前台技术--通过javaScript提交表单

时间:2022-12-31 06:38:18

window.location=pp+"?username="+getCookie("username")+"&userid="+getCookie("userid");

替换

document.write("<form action="+pp+" method=post name=formx1 style='display:none'>");
document.write("<input type=hidden name=username value='"+getCookie("username")+"' />");
document.write("<input type=hidden name=userid value='"+getCookie("userid")+"' />");
document.write("</form>");
document.formx1.submit();