頁面跳轉相關方法
阿新 • • 發佈:2018-11-02
第一種方式:
父頁面
js 部分
var screenParam = "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=0,left="+0+",height="+screen.availHeight+",width="+screen.availWidth;
var url = "http://"+window.location.host+"/Basis/apps/templates/Wfrm_test.html";
var win = window.open(url, "_blank", screenParam);
win.resizeTo(screen.availWidth, screen.availHeight);
html 部分
<form target="_blank"></form>
子頁面
// 關閉上一級的頁面
function closeWindow(){
if(window.opener){
try{
window.opener.open("","_self");
window.opener.opener = null;
window.opener.close();
}catch(e){}
}
}