📄 content.js
字号:
<!--
document.onmouseover = doDocumentOnMouseOver;
document.onmouseout = doDocumentOnMouseOut;
function doDocumentOnMouseOver() {
var eSrc = window.event.srcElement ;
if (eSrc.className == "item") {
window.event.srcElement.className = "highlight"; // change class
}
}
function doDocumentOnMouseOut() {
var eSrc = window.event.srcElement ;
if (eSrc.className == "highlight") {
window.event.srcElement.className = "item"; // change class
}
}
var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4)) ? true : false;
ver4 = (NS4 || IE4) ? true : false;
//function expandIt(){return}
//function expandAll(){return}
//isExpanded = false;
var SubItem = "";
var InitItem = "";
var ChildItem= "";
var flag="";
var back="";
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";
}
}
//alert("inititem="+InitItem+",childitem= "+ChildItem+",flag= "+flag+",pageitem="+pageitem);
if(InitItem != "")
{
if(ChildItem != "")
{
el = eval(ChildItem);
el.bgColor = "#FFFFFF";
childflag = 1;
}
else
{
if (flag=="1" || pageitem=="3")
childflag = 1;
else if (flag=="0" )
{
childflag=2;
back =1; //如果是收回,既没有任何展开
}
else
childflag = 0; //没有点中任何子项
}
//alert(ChildItem+childflag+"ff"+back);
if (back!="1")
expandIt(InitItem,childflag);
}
else
SubItem = "";
}
function expandIt(el,childflag) {
if (!ver4) return;
if (IE4) {expandIE(el,childflag)} else {expandNS(el,childflag)}
}
function expandIE(el,childflag) {
//alert("childflag"+childflag);
if(SubItem != "")
{
OldImg = eval(SubItem + "Img");
OldItem = eval(SubItem + "Child");
OldItem.style.display = "none";
OldImg.src = "images/plus.gif";
}
if (SubItem == el)
{
SubItem = "";
if (pageitem=="2")
window.document.location = 'kuang.asp?selitem='+el+'&itemflag=0';
else
{
window.document.location = 'kcnr_main.htm';
}
return;
}
//alert(childflag);
if (childflag=="0" && pageitem=="2")
{
window.document.location = 'kuang.asp?selitem='+el+'&itemflag=1';
return;
}
else if(childflag=="0" && pageitem=="3")
{
//alert(el);
if (el=="elOne")
window.document.location = 'kcnr_main_1.htm';
else if (el=="elTwo")
window.document.location = 'kcnr_main_2.htm';
else if (el=="elThree")
window.document.location = 'kcnr_main_3.htm';
else if (el=="elFour")
window.document.location = 'kcnr_main_4.htm';
else if (el=="elFive")
window.document.location = 'kcnr_main_5.htm';
else if (el=="elSix")
window.document.location = 'kcnr_main_6.htm';
else if (el=="elSeven")
window.document.location = 'kcnr_main_7.htm';
else if (el=="elEight")
window.document.location = 'kcnr_main_8.htm';
else
window.document.location = 'kcnr_main.htm';
return;
}
// if (pageitem=="2" )
// {
// window.document.location = 'kuang.asp?selitem='+el+'&itemflag=1';}
// else
// {window.document.location = 'kcnr_main.htm';}
//
whichEl = eval(el + "Child");
whichIm = eval(el + "Img");
// tempColl = document.all.tags("DIV");
// for (i=0; i<tempColl.length; i++) {
// if (tempColl(i).className == "child") tempColl(i).style.display = "none";
// }
if (whichEl.style.display == "none") {
whichEl.style.display = "block";
whichIm.src = "images/minus.gif";
}
else {
whichEl.style.display = "none";
whichIm.src = "images/plus.gif";
}
SubItem = el;
window.event.cancelBubble = true ;
}
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 = "images/minus.gif";
}
else {
whichEl.visibility = "hide";
whichIm.src = "images/plus.gif";
}
arrange();
}
with (document) {
write("<STYLE TYPE='text/css'>");
if (NS4) {
write(".parent {font-size:12pt; line-height:10pt; color:black; text-decoration:none; margin-top: 5px; margin-bottom: 5px; position:absolute; visibility:hidden; color:grey;}");
write(".child {text-decoration:none; font-size:9pt; line-height:10pt; position:absolute; visibility:hidden}");
write(".item { color:grey; text-decoration:none;}");
write(".regular {position:absolute; visibility:hidden}");
write("DIV { color:grey; }")
}
else {
write(".child {font:12px/13px Times; display:none}");
write(".parent {font:12px/13px Times; color:blue; font-weight:bold; text-decoration:none; margin-top: 5px; margin-bottom: 5px; color: black;}");
write(".item { color:grey; text-decoration:none;}");
write(".highlight { color: red; }");
write(".heada { font: 12px/13px; Times}");
write("DIV { color:grey; }")
}
write("</STYLE>");
}
onload = initIt;
//-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -