- if(opener){
- window.close();
- opener.changePage(); //这个是方便刷新父页面,这个比接下来那个好用
- //window.opener.location.href=window.opener.location.href;//刷新父页面
- }else{
- window.close();
- window.location.href=window.location.href;//刷新本页面
- }
还可以用以下这种:
- try{ //这里时try咯
- opener.changePage();
- }catch(e){
- }