天天看點

js之關閉/重新整理視窗相關代碼

//在子頁面寫onunload方法
window.onunload=function(){
//重新整理父頁面
window.opener.reload();
}      
window.location.reload(); //重新整理目前頁面.
parent.location.reload(); //重新整理父親對象(用于架構)
opener.location.reload(); //重新整理父視窗對象(用于單開視窗)
top.location.reload(); //重新整理最頂端對象(用于多開視窗)
window.opener.location.reload();//重新整理父視窗
window.close();//關閉目前視窗
setTimeout('window.close()', 2000);//設定延遲關閉視窗      
var url= __ctx+"/xxx/xx/xxx/dlb.ht?countdate="+rq;
parent.location.href =url;
var dialog = frameElement.dialog; 

$.ligerDialog.close();

dialog.close();