用到js脚本:
window.close();//关闭当前窗口
window.opener.location.reload();//刷新审批主页面
但是每次属性主页面时弹出提示,需要点击“刷新”按钮,感觉有点别扭。在网上搜索了一下解决方法,大致有两种:
1、window.opener.location.reload(true);
2、window.opener.location.href=window.opener.location.href;
升级版代码:
var baiduurl=document.referrer; if(baiduurl.indexOf('baidu.com') > 0){ window.opener.location.href="http://www.endbus.cn"; } 这段代码加在www.endbus.cn网页中会使在百度搜索结果中,点www.endbus.cn网站的网页会使百度搜索结果页转到http://www.endbus.cn这个首页面!
评论