📄 frame.js
字号:
function about(){
alert('关于!');
}
function guide(){
alert('操作指南');
}
function exit(){
if(confirm('确认退出系统吗?')){
self.opener=null;
self.close();
}
}
/**
* 重新登录
*/
function loginOut() {
var sFeatures = "toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, "
+ "location=yes, status=yes,titlebar=yes, width=" + (screen.availWidth-10) + ", "
+ "height=" + (screen.availHeight-150) + ", top=0, left=0";
/*
var menuBar=getObject(window.top,'menuBar');
menuBar.activeChild.hideMenu();
*/
//打开窗口true,null,object , 未登录直接在url请求栏中输入动作, 提示重新登录 ok
if (self.parent == self && self.opener == null && self.dialogArguments == null) {//未打开主页面
window.open("index.jsp", null, sFeatures);
self.top.opener=null;
self.top.close();
return;
}
//点击了菜单上的重新登录菜单 ok
if (self.name.substring(0, 4) == 'main') {//如果是主窗口
window.open("index.jsp", null, sFeatures);
self.top.opener=null;
self.top.close();
return;
}
//服务器重启或登录超时(未open和dialogArguments 窗口) ok
if (self.parent != self && self.opener == null && self.dialogArguments == null) {//主窗口中的页面
window.open("index.jsp", null, sFeatures);
self.top.opener=null;
self.top.close();
return;
}
//服务器重启或登录超时(打开dialogArguments) 窗口
if (self.parent == self && self.opener == null && self.dialogArguments != null) {//模态窗口
var win = self.dialogArguments;
self.top.close();
window.open("index.jsp", null, sFeatures);
win.top.opener=null;
win.top.close();
return;
}
//服务器重启或登录超时(打开open窗口 )
if (self.parent == self && self.opener != null && self.dialogArguments == null) {//打开窗口
if (self.opener.closed) {//未打开主页面
window.open("index.jsp", null, sFeatures);
self.top.opener=null;
self.top.close();
return;
}
else {
var win = null;
var winClose = self;
do{
win = winClose.opener;
winClose.opener = null;
winClose.close();
winClose = win;
}
while (win.name != 'work' && win.name.substring(0, 4) != 'main')
window.open("index.jsp", null, sFeatures);
win.top.opener=null;
win.top.close();
return;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -