//前端js打开新页面,以post传递参数
以下url为请求地址,beginTime为我所需传递的参数,以下方法就是替换成form表单提交的方式实现此功能
var newWindow = window.open(url,"");
var html = "";
html += "<html><head></head><body><form id='formid' method='post' action='"+url+"'>";
html += "<input type='hidden' name='beginTime' value='" + beginTime +"'/>";
html += "</form><script type='text/javascript'>document.getElementById(\"formid\").submit()</script></body></html>";
newWindow.document.write(html);