📄 index.htm@page=.primary
字号:
this.version = parseFloat(ua.substring(i, i+4));
if (ua.indexOf('Mac') >= 0) {this.platform = 'Mac';}
if (ua.indexOf('OS/2') >= 0) {this.platform = 'OS/2';}
if (ua.indexOf('X11') >= 0) {this.platform = 'UNIX';}
var v = this.version;
var p = this.platform;
var NS = (this.code == 'NS');
var IE = (this.code == 'MSIE');
var WTV = (this.code == 'WebTV');
var OP = (this.code == 'OP');
var OP32up = (OP && (v >= 3.2));
var IE4up = (IE && (v >= 4));
var NS3up = (NS && (v >= 3));
this.canCache = NS3up || IE4up || OP32up || WTV;
this.canOnMouseOut = this.canCache;
this.canOnError = NS3up || IE4up || OP32up;
this.canJSVoid = !((NS && !NS3up) || (IE && !IE4up) || (OP && (v < 3.5)));
this.lineByLine = (v < 4);
this.mustMoveAfterLoad = NS3up || (IE4up && (p != 'Mac')) || WTV;
if (NS3up || IE4up || WTV) {
this.reloadMethod = 'replace';
} else {
this.reloadMethod = (NS && (v == 2.01) && (p != 'Win')) ? 'timeout' : 'href';
}
this.canFloat = NS || (IE && !((p == 'Mac') && (v >= 4) && (v < 5)));
this.hasDHTML = ((NS || IE) && (v >= 4)) && !(IE && (p == 'Mac') && (v < 4.5));
this.needLM = NS || (IE && (p == 'Mac') && (v >= 4.5));
this.DHTMLRange = IE ? '.all' : '';
this.DHTMLStyleObj = IE ? '.style' : '';
this.DHTMLDivHeight = IE ? '.offsetHeight' : '.clip.height';
}
function getWindow() {return (floatingMode) ? myOpener : self;}
//function getWindow() {myOpener : self;}
function setStatus(theText) {
var theWindow = getWindow();
if (theWindow) {
theWindow.status = theText;
if (!theBrowser.canOnMouseOut) {
clearTimeout(statusTimeout);
statusTimeout = setTimeout('clearStatus()', 5000);
}
}
return true;
}
function clearStatus() {
var theWindow = getWindow();
if (theWindow) {theWindow.status = '';}
}
function getMode() {
var theMode = getParm(document.cookie, 'mode', ';');
return ((theMode == "Floating") || (theMode == "NoFrames")) ? theMode : "Frames";
}
function smOnError (msg, url, lno) {
smCallerWin.onerror = oldErrorHandler;
if (confirm(smSecurityMsg)) {setTimeout('setMode("' + smNewMode + '");', 100);}
return true;
}
function smSetCookie(theMode) {
document.cookie = 'mode=' + theMode + '; path=/';
if (getMode() != theMode) {
alert(smCookieMsg);
return false;
} else {
return true;
}
}
function setMode(theMode, callerWin) {
smNewMode = theMode
smCallerWin = (theBrowser.code == 'NS') ? callerWin : self;
var okToGo = true;
var currentMode = getMode();
if (theMode != currentMode) {
if (currentMode == 'Floating') {
if (smSetCookie(theMode)) {self.close();}
} else {
var dest = '';
if (theBrowser.canFloat) {
if ((theMenu.savePage) && (callerWin)) {
if (theBrowser.canOnError) {
oldErrorHandler = smCallerWin.onerror;
smCallerWin.onerror = smOnError;
}
var p = theMenu.contentWin().location.pathname;
if (theBrowser.canOnError) {smCallerWin.onerror = oldErrorHandler;}
if (p) {
dest = fixPath(p);
} else {
if (!confirm(smSecurityMsg)) {okToGo = false;}
}
}
} else {
alert(smNoFloat);
okToGo = false;
}
if (okToGo && smSetCookie(theMode)) {
if (theMode == 'NoFrames') {
location.href = (index3 == '') ? ((dest == '') ? '/' : dest) : index3;
} else {
location.href = index2 + '?page=' + escape(dest);
}
}
}
}
}
function fixPath(p) {
return (p.substring(0,2) == '/:') ? p.substring(p.indexOf('/', 2), p.length) : p;
}
function getParm(theStr, parm, delim) {
// returns value of parm from string
if (theStr.length == 0) {return '';}
var sPos = theStr.indexOf(parm + "=");
if (sPos == -1) {return '';}
sPos = sPos + parm.length + 1;
var ePos = theStr.indexOf(delim, sPos);
if (ePos == -1) {ePos = theStr.length;}
return unescape(theStr.substring(sPos, ePos));
}
function pageFromSearch(def, m, selIt) {
var s = self.location.search;
if ((s == null) || (s.length <= 1)) {return def;}
var p = getParm(s, 'page', '&');
p = (p != '') ? fixPath(p) : fixPath(s.substring(1, s.length));
if (m != null) {
var e = m.findEntry(p, 'URL', 'exact');
if ((e != -1) && selIt) {
m.setEntry(e, true);
m.selectEntry(e);
}
}
return p;
}
function loadURLInTop(theURL) {
var theWindow = getWindow();
if (theWindow) {theWindow.top.location.href = theURL;}
}
function defOnError(msg, url, lno) {
if (jsErrorMsg == '') {
return false;
} else {
alert(jsErrorMsg + '.\n\nError: ' + msg + '\nPage: ' + url + '\nLine: ' + lno + '\nBrowser: ' + navigator.userAgent);
return true;
}
}
// Declare global variables
var theBrowser = new browserInfo;
var jsErrorMsg = '页面发生脚本错误';
jsErrorMsg += '请通知管理员.';
if (theBrowser.canOnError) {self.onerror = defOnError;}
var theMenu = new Menu;
var JoustFrameset = true;
var statusTimeout = 0;
var index1 = 'index.htm';
//var index2 = 'index2.htm';
//var index3 = 'index3.htm';
var smCallerWin;
var smNewMode;
var oldErrorHandler;
var smNoFloat = 'Sorry, your browser does not support this feature!';
var smCookieMsg = 'You must have Cookies enabled to change the display mode!';
var smSecurityMsg = 'Due to security restrictions imposed by your browser, I cannot ';
smSecurityMsg += 'change modes while a page from another server is being displayed. ';
smSecurityMsg += 'The default home page for this site will be displayed instead.';
var floatingMode = (getMode() == 'Floating');
var myOpener = null;
if (floatingMode == true) {
if (self.opener) {
myOpener = self.opener;
if (myOpener.JoustFrameset) {myOpener.setTimeout('setGlobals();', 100);}
} else {
document.cookie = 'mode=Frames; path=/';
floatingMode = false;
}
} else {
if (getMode() != 'Frames') {document.cookie = 'mode=Frames; path=/';}
}
// ############ End ############
function initOutlineIcons(imgStore) {
var ip = 'images/menu/';
ip += (theBrowser.platform == 'Mac') ? 'mac/' : ((theBrowser.platform == 'OS/2') ? 'os2/' : 'win/');
imgStore.add('iconPlusTop', ip + 'plustop.gif', 18, 16);
imgStore.add('iconPlus', ip + 'plus.gif', 18, 16);
imgStore.add('iconPlusBottom', ip + 'plusbottom.gif', 18, 16);
imgStore.add('iconPlusOnly', ip + 'plusonly.gif', 18, 16);
imgStore.add('iconMinusTop', ip + 'minustop.gif', 18, 16);
imgStore.add('iconMinus', ip + 'minus.gif', 18, 16);
imgStore.add('iconMinusBottom', ip + 'minusbottom.gif', 18, 16);
imgStore.add('iconMinusOnly', ip + 'minusonly.gif', 18, 16);
imgStore.add('iconLine', ip + 'line.gif', 18, 16);
imgStore.add('iconBlank', ip + 'blank.gif', 18, 16);
imgStore.add('iconJoinTop', ip + 'jointop.gif', 18, 16);
imgStore.add('iconJoin', ip + 'join.gif', 18, 16);
imgStore.add('iconJoinBottom', ip + 'joinbottom.gif', 18, 16);
//Add folder and document images to the imgStore.
imgStore.add('Folder', ip + 'folderclosed.gif', 18, 16);
var di = 'images/menu/';
if ((theBrowser.code == 'NS') || (theBrowser.code == 'MSIE')) {
di += theBrowser.code.toLowerCase() + '_doc';
imgStore.add('Document', di + '.gif', 18, 16);
imgStore.add('DocumentMouseOver', di + '_mo.gif', 18, 16);
imgStore.add('DocumentSelected', di + '_sel.gif', 18, 16);
} else {
imgStore.add('Document', di + 'doc.gif', 18, 16);
}
}
function initialise() {
// Tell where to find the various index files it needs
index1 = 'index.htm';
//index2 = 'index2.htm';
//index3 = 'index3.htm';
// Set up parameters to control menu behaviour
theMenu.autoScrolling = true;
theMenu.modalFolders = false;
theMenu.linkOnExpand = false;
theMenu.toggleOnLink = false;
theMenu.showAllAsLinks = false;
theMenu.savePage = true;
theMenu.tipText = "status";
theMenu.selectParents = false;
theMenu.name = "theMenu";
theMenu.container = "self.menu";
theMenu.reverseRef = "parent";
theMenu.contentFrame = "text";
theMenu.defaultTarget = "text";
// Initialise all the icons
initOutlineIcons(theMenu.imgStore);
// Now set up the menu with a whole lot of addEntry and addChild function calls
var level1ID = -1;
var level2ID = -1;
var level3ID = -1;
//level表示最高级,level2子级,level3子子级,Document文件,folder文件夹。
level1ID = theMenu.addEntry(-1, "Folder", "主目录一", "", "Help for Folder 1");
//Set the initial state of the folder to "open"
theMenu.entry[level1ID].isopen = true;
//以上不要改变
//仿照下面的格式增加项目即可;
level2ID = theMenu.addChild(level1ID, "Document", "第一页", "page1.htm", "第一页的例子");
level2ID = theMenu.addEntry (level2ID, "Document", "第二页", "page2.htm", "第二页的例子");
level2ID = theMenu.addEntry (level2ID, "Document", "第三页", "page3.htm", "第三页的例子");
level2ID = theMenu.addEntry (level2ID, "Document", "第四页", "page4.htm", "第四页的例子");
level2ID = theMenu.addEntry(level2ID, "Folder", "次主目录", "", "主目录二说明");
level3ID = theMenu.addChild(level2ID, "Document", "第一页", "page1.htm", "第一页的例子");
level2ID = theMenu.addEntry (level3ID, "Document", "第二页", "page2.htm", "第二页的例子");
level1ID = theMenu.addEntry(level1ID, "Folder", "主目录二", "", "Help for Folder 1");
level2ID = theMenu.addChild(level1ID, "Document", "第一页", "page1.htm", "第一页的例子");
level2ID = theMenu.addEntry (level2ID, "Document", "第二页", "page2.htm", "第二页的例子");
level1ID = theMenu.addEntry(level1ID, "Document", "重要说明及下载", "readme.htm", "重要说明及下载");
level1ID = theMenu.addEntry(level1ID, "Document", "本站首页", "../../../index.html", "java2000首页");
}
self.defaultStatus = "";
//-->
</script>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (self.name == 'menu') {
self.location.href = "menu.htm";
} else {
initialise();
var thePage = pageFromSearch('home.htm', theMenu, true);
//下面用js脚本写FRAMESET结构;
self.document.writeln('<frameset rows="100%" cols="150,*">');
self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="1" marginheight="1" APPLICATION="yes">');
//self.document.writeln('<frameset cols="230,*" rows="100%">');
//self.document.writeln('<frameset cols="100%" rows="*,48">');
//self.document.writeln('<frame name="menu" src="menu.htm" scrolling="auto" marginwidth="1" marginheight="1" APPLICATION="yes">');
//self.document.writeln('<frame name="menuCntrl" src="menucntrl.htm" scrolling="no" marginwidth="0" marginheight="0" APPLICATION="yes">');
//self.document.writeln('</frameset>');
self.document.writeln('<frame name="text" src="' + thePage +'" scrolling="auto" APPLICATION="yes">');
//self.document.writeln('</frameset>');
self.document.writeln('</frameset>');
// }
}
//-->
</SCRIPT>
<NOSCRIPT>
<BODY BGCOLOR="#FFFFCC">
<h1>Fold Menu Tree</h1>
Your browser does not support JavaScript
<P>If you have any problems with this site, please contact the Webmaster.</P>
</BODY>
</NOSCRIPT>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -