📄 frame.js
字号:
/*** 本系统的菜单只支持Microsoft Internet Explorer浏览器**/function browser(page){ var name = window.navigator.appName; var IEname = "Microsoft Internet Explorer"; if(name !==null && name == IEname){ if(page){ link("loginAction.do?method=loginInit"); } }else{ link("loginAction.do?method=sorry"); }}function about() { alert("\u5173\u4e8e!");}function guide() { alert("\u64cd\u4f5c\u6307\u5357");}function exit() { if (confirm("\u786e\u8ba4\u9000\u51fa\u7cfb\u7edf\u5417?")) { link("loginAction.do?method=loginOut"); self.opener = null; self.close(); }}document.onkeydown = keydownandup;document.onkeyup = keydownandup;function keydownandup() { var k = window.event.keyCode; if (k == 116) { window.event.keyCode = 0; window.event.returnValue = false; }}function Click() { window.event.returnValue = false;}/****Ajax便捷方式***/function MyAjax(url,para,method,functionMethod){ var myAjax = new Ajax.Request( url, { method:method, parameters:para, onSuccess:functionMethod });}/**
* 重新登录
*/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 - 60) + ", 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) {//未打开主页面 link("loginAction.do?method=loginOut"); return; }
//点击了菜单上的重新登录菜单 ok if (self.name.substring(0, 4) == "main") {//如果是主窗口 window.open("loginAction.do?method=loginOut", null, sFeatures); self.close(); return; }
//服务器重启或登录超时(未open和dialogArguments 窗口) ok if (self.parent != self && self.opener == null && self.dialogArguments == null) {//主窗口中的页面 var obj = self.parent; while (obj.name.substring(0, 4) != "main") { obj = obj.parent; } window.open("loginAction.do?method=loginOut", null, sFeatures); obj.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("loginAction.do?method=loginOut", null, sFeatures); self.top.opener = null; self.top.close(); return; } else { var winClose = self; var win = winClose.opener; while (winClose.name.substring(0, 9) != "openNoBar"){ alert(winClose.name); win = winClose.opener; winClose.opener = null; winClose = win; } winClose.close(); var obj = win.parent; while (obj.name.substring(0, 4) != "main") { obj = obj.parent; } window.open("loginAction.do?method=loginOut", null, sFeatures); obj.close(); return; } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -