📄 rsmenu.js
字号:
var bV=parseInt(navigator.appVersion);
var NS4=(document.layers) ? true : false;
var IE4=((document.all)&&(bV>=4))?true:false;
var ver4 = (NS4 || IE4) ? true : false;
function expandIt(){return}
function expandAll(){return}
function nomsg(){self.status="";}
if(ver4){
document.write("<SCR"+"IPT LANGUAGE=\"JavaScript\" SRC=\"rsmenu1.js\"></SCR"+"IPT>");
}
isExpanded = false;
function getIndex(el) {
ind = null;
for (i=0; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id == el) {
ind = i;
break;
}
}
return ind;
}
function arrange() {
nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
for (i=firstInd+1; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.visibility != "hide") {
whichEl.pageY = nextY;
nextY += whichEl.document.height;
}
}
}
function initIt(){
if (NS4) {
for (i=0; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
}
arrange();
}
else {
tempColl = document.all.tags("DIV");
for (i=0; i<tempColl.length; i++) {
if (tempColl(i).className == "child") tempColl(i).style.display = "none";
}
}
}
function expandIt(el) {
if (!ver4) return;
if (IE4) {expandIE(el)} else {expandNS(el)}
}
function expandIE(el) {
whichEl = eval(el + "Child");
whichIm = event.srcElement;
if (whichEl.style.display == "none") {
tempColl = document.all.tags("DIV");
for (i=0; i<tempColl.length; i++) {
if (tempColl(i).className == "child") tempColl(i).style.display = "none";
}
whichEl.style.display = "block";
whichIm.src = "bullet-minus.gif";
}
else {
whichEl.style.display = "none";
whichIm.src = "bullet-plus.gif";
}
}
function expandNS(el) {
whichEl = eval("document." + el + "Child");
whichIm = eval("document." + el + "Parent.document.images['imEx']");
if (whichEl.visibility == "hide") {
whichEl.visibility = "show";
whichIm.src = "bullet-minus.gif";
}
else {
whichEl.visibility = "hide";
whichIm.src = "bullet-plus.gif";
}
arrange();
}
function showAll() {
for (i=firstInd; i<document.layers.length; i++) {
whichEl = document.layers[i];
whichEl.visibility = "show";
}
}
function expandAll(isBot) {
if (NS4) {
for (i=firstInd; i<document.layers.length; i++) {
whichEl = document.layers[i];
if (whichEl.id.indexOf("Child") != -1) {
whichEl.visibility = (isExpanded) ? "hide" : "show";
}
}
arrange();
if (isBot && isExpanded) scrollTo(0,document.layers[firstInd].pageY);
}
else {
divColl = document.all.tags("DIV");
for (i=0; i<divColl.length; i++) {
if (divColl(i).className == "child") {
divColl(i).style.display = (isExpanded) ? "none" : "block";
}
}
}
isExpanded = !isExpanded;
}
with (document) {
write("<STYLE TYPE='text/css'>");
if (NS4) {
write(".parent {position:absolute; visibility:hidden}");
write(".child {position:absolute; visibility:hidden}");
write(".regular {position:absolute; visibility:hidden}")
}
else {
write(".child {display:none}")
}
write("</STYLE>");
}
onload = initIt;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -