// 关闭当前窗口并刷新父页面
function closeWindow() {
if(window.opener){
if(window.opener.document.forms[0]){
//父页面的url拼接随机数用于处理IE8重复提交表单的的问题
var openerAction = window.opener.document.forms[0].action;
if(openerAction.indexOf('?')!=-1){
openerAction+="&repeatSubmitRound="+Math.round(Math.random()*100000);
}else{
openerAction+="?repeatSubmitRound="+Math.round(Math.random()*100000);
}
window.opener.document.forms[0].action = openerAction;
window.opener.document.forms[0].submit();
}else{
window.opener.location.reload();
}
}
window.close();
}
JS知识点(二):父页面的url拼接随机数用于处理IE8重复提交表单的的问题
最新推荐文章于 2023-12-21 00:25:08 发布