⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.js

📁 纯粹jsp编写的新闻发布系统
💻 JS
字号:
document.write("<style type=text/css>#master {LEFT: -280px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; WIDTH: 200px; Z-INDEX: 2}#menu {LEFT: 280px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; WIDTH: 18px; Z-INDEX: 5}#top {LEFT: 0px; POSITION: absolute; TOP: 25px; VISIBILITY: visible; WIDTH: 280px; Z-INDEX: 5}#screen {LEFT: 0px; POSITION: absolute; TOP: 31px; VISIBILITY: visible; WIDTH: 280px; Z-INDEX: 5}#screenlinks {LEFT: 0px; POSITION: absolute; TOP: 31px; VISIBILITY: visible; WIDTH: 280px; Z-INDEX: 5}</style>")
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ie){
document.write('<style type="text/css">')
document.write("#screen	{filter:Alpha(Opacity=30);}")
document.write("</style>")
}

if(ns){
document.write('<style type="text/css">')
document.write("#master	{clip:rect(0,150,250,0);}")
document.write("</style>")
}


var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0


var master = new Object("element")
master.curLeft = -280;	master.curTop = 10;
master.gapLeft = 0;		master.gapTop = 0;
master.timer = null;

function moveAlong(layerName, paceLeft, paceTop, fromLeft, fromTop){
clearTimeout(eval(layerName).timer)

if(eval(layerName).curLeft != fromLeft){
     if((Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft)) < paceLeft){eval(layerName).curLeft = fromLeft}
else if(eval(layerName).curLeft < fromLeft){eval(layerName).curLeft = eval(layerName).curLeft + paceLeft}
else if(eval(layerName).curLeft > fromLeft){eval(layerName).curLeft = eval(layerName).curLeft - paceLeft}
if(ie){document.all[layerName].style.left = eval(layerName).curLeft}
if(ns){document[layerName].left = eval(layerName).curLeft}
}

if(eval(layerName).curTop != fromTop){
     if((Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop)) < paceTop){eval(layerName).curTop = fromTop}
else if(eval(layerName).curTop < fromTop){eval(layerName).curTop = eval(layerName).curTop + paceTop}
else if(eval(layerName).curTop > fromTop){eval(layerName).curTop = eval(layerName).curTop - paceTop}
if(ie){document.all[layerName].style.top = eval(layerName).curTop}
if(ns){document[layerName].top = eval(layerName).curTop}
}


eval(layerName).timer=setTimeout('moveAlong("'+layerName+'",'+paceLeft+','+paceTop+','+fromLeft+','+fromTop+')',30)
}

function setPace(layerName, fromLeft, fromTop, motionSpeed){
eval(layerName).gapLeft = (Math.max(eval(layerName).curLeft, fromLeft) - Math.min(eval(layerName).curLeft, fromLeft))/motionSpeed
eval(layerName).gapTop = (Math.max(eval(layerName).curTop, fromTop) - Math.min(eval(layerName).curTop, fromTop))/motionSpeed

moveAlong(layerName, eval(layerName).gapLeft, eval(layerName).gapTop, fromLeft, fromTop)
}

var expandState = 0

function expand(){
if(expandState == 0){setPace("master", 0, 10, 10); if(ie){document.menutop.src = "../images/menub.gif"}; expandState = 1;}
else{setPace("master", -280, 10, 10); if(ie){document.menutop.src = "../images/menu.gif"}; expandState = 0;}
}

document.write("<q id=master><q id=menu onmouseover=\"javascript:expand()\"><table border=0 cellpadding=0 cellspacing=0 width=18><tbody><tr><td width=\"100%\"><a href=\"javascript:expand()\" onFocus=this.blur()><img  alt=点击这里展开/关闭快捷菜单 border=0 height=70 name=menutop src=\"../images/menu.gif\" width=18></a></td></tr></tbody></table></q><q id=top><table border=0 cellpadding=0 cellspacing=0 width=280><tbody><tr><td width=\"100%\"><img border=0 height=6 src=\"../images/top.gif\"  width=280></td> </tr></tbody></table></q><q id=screen onmouseout=\"javascript:expand()\"><table border=0 cellpadding=5 cellspacing=0 width=280><tbody><tr><td bgcolor=#B7C7F2 width=\"100%\"><table bgcolor=#66ff66 border=0 cellpadding=0 cellspacing=0 width=\"100%\" height=101><tbody><tr><td width=\"100%\"><table border=0 cellpadding=5 cellspacing=1 width=\"100%\"><tbody><tr> <td bgcolor=#e3e3e3 width=\"100%\"><br><br><br><br><br></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></q><q id=screenlinks ><table border=0 cellpadding=6 cellspacing=0 width=280><tbody><tr><td style=\"FILTER: alpha(opacity=90)\" width=\"100%\"><table bgcolor=#ff9900 border=0 cellpadding=0 cellspacing=0 width=\"100%\"><tbody> <tr><td width=\"100%\"><table border=0 cellpadding=6 cellspacing=1 width=\"100%\"><tbody><tr><td bgcolor=#eeeeee width=\"100%\" align=\"left\"><font color=ff9900>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;欢迎打开 </font><font color=009900>背景音乐盒</font><br><object classid=clsid:22d6f312-b0f6-11d0-94ab-0080c74c7e95 width=250 height=70><param name=showstatusbar value=1><param name=filename value='../music/upload/rwmdqsj.mp3'><embed src='../music/upload/rwmdqsj.mp3''></embed></object></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></q></q>");


if(ie){var sidemenu = document.all.master;}
if(ns){var sidemenu = document.master;}

function FixY(){
if(ie){sidemenu.style.top = document.body.scrollTop+10}
if(ns){sidemenu.top = window.pageYOffset+10}
}

setInterval("FixY()",280);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -