中文(简体)
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>建站学院</title> </head> <body> <style type=" text/css"> .dot { 位置:绝对;宽度:6;高度:6;可见性:隐藏;背景颜色:红色;字体大小:1px;光标:指针;光标:手; z-index: 100 } .dotoff { 位置:绝对;宽度:6;高度:6;可见性:隐藏;背景颜色:灰色;字体大小:1px;光标:默认; z-index: 100} .dotempty { 位置:绝对;宽度:6;高度:6;可见性:隐藏;背景颜色:橙色;字体大小:1px;光标:指针;光标:手; zindex: 100 } .caption { 位置: 绝对;可见性:隐藏;字体系列:Tahoma;颜色:黑色;字体大小:11px;文本对齐:居中;光标:默认; z-index: 1 } body { 边距: 0px;背景颜色:白色; } a { 颜色:银色;文本装饰:无 } p { 字体大小:10px;字体系列:tahoma; color: black } </style> <script language="JavaScript" type="text/javascript"> function lib_bwcheck(){ //浏览器检查(需要) this.ver=navigator.appVersion this.agent=navigator.userAgent this. dom=document.getElementById?1:0 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; this.ie4=(document.all && !this.dom && !this.opera5)?1:0; this.ie=this.ie4||this.ie5||this.ie6 this.mac=this.agent.indexOf("Mac")>-1 this.ns6=(this.dom && parseInt(this.ver) > = 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) return this } var bw=new lib_bwcheck() // this 的代码脚本在正文中,上面的 browsercheck 没有使用。 </script> <script language="javascript1.2" type="text/javascript"> <!-- // DotMenu // 提供跨浏览器功能 //============= ========================= function getObjectRef(name) { if(document.getElementById) return document.getElementById(name); } else if(document.all) return document.all[name];否则返回空; } // 辅助脚本的通用函数 //========================================== = function show(name) { var el = getObjectRef(name); if(el) el.style.visibility = "可见"; } function hide(name) { var el = getObjectRef(name); if(el) el.style.visibility = "隐藏"; } function getWidth(name) { var el = getObjectRef(name); return el.offsetWidth; } function getHeight(name) { var el = getObjectRef(name);返回 el.offsetHeight; } function moveMe(name,x,y) { var el = getObjectRef(name); if(el) { el.style.top = parseInt(y); el.style.left = parseInt(x); } } function moveBy(name,x,y) { var el = getObjectRef(name); if(el) { el.style.top = parseInt(el.style.top) + parseInt(y); el.style.left = parseInt(el.style.left) + parseInt(x); } } // 创建菜单对象 //============================ var menuCount = 0; function menuObject(name,x,y,caption, r, Parent) { if ( (!document.getElementById&&!document.all) || navigator.userAgent.indexOf("Opera")>-1) return; } document.write('<div id="divDot' + menuCount + '" class="dotempty" style="top: ' + y + '; left: ' + x + '"></div>'); document.write('<div id="divCap' + menuCount + '" class="caption" style="top: 0; left: 0">' + 标题 + '</div>'); this.name = 名称; this.parent = 父级 this.ref = "divDot" + menuCount; this.caption = "divCap" + menuCount if(r) this.radius = r;否则 this.radius = 400; this.subMenus = new Array();这个状态 = 0; this.moving = false; if(this.parent) this.action = "null";否则 this.action = "切换"; if(this.parent) this.startAngle = Parent.startAngle;否则 this.startAngle = 0; getObjectRef(this.ref).objRef = this.name; this.show = function() { show(this.ref); } this.hide = function() { hide(this.ref); } this.moveMe = function(x,y) { if(this.parent) { x += this.parent.x(); y += this.parent.y(); moveMe(this.ref,x,y); } this.moveBy = function(x,y) { moveBy(this.ref,x,y); } this.x = function() { return parseInt(getObjectRef(this.ref).style.left); } this.y = function() { return parseInt(getObjectRef(this.ref).style.top); } this.w = function() { return getWidth(this.ref); } this.h = function() { return getHeight(this.ref); } this.showCaption = function() { moveMe(this.caption, this.x() - (getWidth(this.caption)/2) + (this.w()/2), (this.y() + this .h()));显示(this.标题); } this.hideCaption = function() { hide(this.caption); } this.setCaption = function(c) { getObjectRef(this.caption).innerHTML = c;} this.addItem = function(c,action,r) { getObjectRef(this.ref).className = "dot"; } if(!r) r = this.radius/2; var sub = new menuObject(this.name + ".subMenus[" + this.subMenus.length + "]",0,0,c,r,this);子.父=这个;子动作=动作; sub.moveMe(0,0); this.subMenus[this.subMenus.length] = sub;返回子; } this.expand = function() { if(this.subMenus.length > 0) { var p = true; if(this.parent) { p = !this.parent.moving; for(var i=0; i<this.parent.subMenus.length;i++) p = p && ((this.parent.subMenus[i].state==0) || (this.parent.subMenus[i] .state==this.parent.subMenus[i].subMenus.length)) && (this.parent.subMenus[i].moving==false); } 否则 var o = false; if((!this.parent || this.parent.state == this.parent.subMenus.length) && p) { if(this.parent) this.collapseAll(this.name); } var diff = 360 / this.subMenus.length; for(var i=0;i<this.subMenus.length;i++){ this.subMenus[i].moveMe(0,0); this.subMenus[i].show(); this.moving = true; this.subMenus[i].slide(this.subMenus[i].radius * cos(degToRad((diff*i)+this.startAngle)), this.subMenus[i].radius * sin(degToRad((diff* i)+this.startAngle)), this.name + ".subMenus[" + i + "].showCaption();" + this.name + ".moving=false;" + this.name + ".state+= 1;"); } if(this.parent){ getObjectRef(this.parent.ref).style.filter = "alpha (opacity=33)"; getObjectRef(this.parent.ref).style.MozOpacity = "33%"; getObjectRef(this.parent.ref).className = "dotoff"; getObjectRef(this.parent.caption).style.filter = "alpha (不透明度=33)"; getObjectRef(this.parent.caption).style.MozOpacity = "33%"; for(i=0;i<this.parent.subMenus.length;i++) { getObjectRef(this.parent.subMenus[i].ref).style.filter = "alpha (不透明度=66)"; getObjectRef(this.parent.subMenus[i].ref).style.MozOpacity = "66%"; getObjectRef(this.parent.subMenus[i].caption).style.filter = "alpha (不透明度=66)"; getObjectRef(this.parent.subMenus[i].caption).style.MozOpacity = "66%"; } if(this.parent.parent) { for(i=0;i<this.parent.parent.subMenus.length;i++) { getObjectRef(this.parent.parent.subMenus[i].ref).style.filter =“阿尔法(不透明度=33)”; getObjectRef(this.parent.parent.subMenus[i].ref).style.MozOpacity = "33%"; getObjectRef(this.parent.parent.subMenus[i].ref).className = "dotoff"; getObjectRef(this.parent.parent.subMenus[i].caption).style.filter = "alpha (不透明度=33)"; getObjectRef(this.parent.parent.subMenus[i].caption).style.MozOpacity = "33%"; getObjectRef(this.parent.parent.ref).style.MozOpacity = "33%"; getObjectRef(this.parent.parent.ref).style.MozOpacity = "33%"; getObjectRef(this.parent.parent.ref).className = "dotoff"; getObjectRef(this.ref).style.filter = "alpha (不透明度=66)"; getObjectRef(this.caption).style.filter = "alpha (不透明度=66)"; getObjectRef(this.ref).style.MozOpacity = "66%"; getObjectRef(this.caption).style.MozOpacity = "66%"; } } } this.collapse = function() { var p = true; p = !this.moving; for(var i=0; i<this.subMenus.length;i++) p = p && (this.subMenus[i].state==0) && (this.subMenus[i].moving==false); if(p && this.subMenus.length > 0) { for(var i=0;i<this.subMenus.length;i++){ this.subMenus[i].hideCaption(); } this.moving = true; this.subMenus[i].slide(0, 0, this.name + ".subMenus[" + i + "].hide();" + this.name + ".moving=false;" + this.name + “.state-=1;”); } if(this.parent){ getObjectRef(this.parent.ref).style.filter = "alpha (opacity=66)"; getObjectRef(this.parent.ref).style.MozOpacity = "66%"; if(this.parent.subMenus.length != 0) getObjectRef(this.parent.ref).className = "dot";否则 getObjectRef(this.parent.ref).className = "dotempty"; getObjectRef(this.parent.caption).style.filter = "alpha (不透明度=66)"; getObjectRef(this.parent.caption).style.MozOpacity = "66%"; for(i=0;i<this.parent.subMenus.length;i++) { getObjectRef(this.parent.subMenus[i].ref).style.filter = "alpha (不透明度=100)"; getObjectRef(this.parent.subMenus[i].ref).style.MozOpacity = "100%"; if(this.parent.subMenus[i].subMenus.length != 0) getObjectRef(this.parent.subMenus[i].ref).className = "dot";否则 getObjectRef(this.parent.subMenus[i].ref).className = "dotempty"; getObjectRef(this.parent.subMenus[i].caption).style.filter = "alpha (不透明度=100)"; getObjectRef(this.parent.subMenus[i].caption).style.MozOpacity = "100%"; } if(this.parent.parent) { for(i=0;i<this.parent.parent.subMenus.length;i++) { getObjectRef(this.parent.parent.subMenus[i].ref).style.filter =“阿尔法(不透明度=66)”; getObjectRef(this.parent.parent.subMenus[i].ref).style.MozOpacity = "66%"; if(this.parent.parent.subMenus[i].subMenus.length != 0) getObjectRef(this.parent.parent.subMenus[i].ref).className = "dot";否则 getObjectRef(this.parent.parent.subMenus[i].ref).className = "dotempty"; getObjectRef(this.parent.parent.subMenus[i].caption).style.filter = "alpha (不透明度=66)"; getObjectRef(this.parent.parent.subMenus[i].caption).style.MozOpacity = "66%"; getObjectRef(this.ref).style.filter = "alpha (不透明度=100)"; getObjectRef(this.caption).style.filter = "alpha (不透明度=100)"; getObjectRef(this.ref).style.MozOpacity = "100%"; getObjectRef(this.caption).style.MozOpacity = "100%"; } } this.collapseAll = function( except) { for(var i=0;i<this.parent.subMenus.length;i++) { if(this.parent.subMenus[i].name!= except && this.parent .subMenus[i].state==this.parent.subMenus[i].subMenus.length) { this.parent.subMenus[i].collapse(); } } } this.toggle = function(e) { if(document.all) id = window.event.srcElement;否则 id = e.target; var dot = eval(id.objRef); if(dot.state==0 && !dot.moving) dot.expand(); else if(dot.state==dot.subMenus.length && !dot.moving) dot.collapse() } this.doAction = function(e) { if(document.all) id = window.event.srcElement;否则 id = e.target; var dot = eval(id.objRef); if(dot.action == "切换") dot.toggle(e);否则 eval(dot.action); } //如果您想更改触发操作的事件,请更改这些 //================================== ======================================== //getObjectRef(this.ref).onmousemove = this.切换; getObjectRef(this.ref).onmouseup = this.doAction; this.slide = function(xx,yy,func) { if(!func) func = ""; var px = this.parent.x(); var py = this.parent.y(); var x = xx - this.x() + px; var y = yy - this.y() + py; var d = sqrt(square(xx-this.x() + px) + square(yy-this.y() + py)); var v = d/8;如果(v<1)v = 1; if( (Math.abs(x) < v) && (Math.abs(y) < v) ) { moveMe(this.ref,xx + px,yy + py); if(func != "") eval(func); } else { var a = round(atan(x,y)); dx = 圆(v * cos(degToRad(a))); dy = round(v * sin(degToRad(a))); this.moveBy(dx,dy); setTimeout(this.name + ".slide(" + xx + "," + yy + ", '" + func + "');",10); } } // 预加载 Windows 过滤器。 if (menuCount==0 && document.all) document.all[this.ref].style.filter = "alpha (opacity=100)";菜单计数++;返回这个; } // 数学函数 //================ var pi = Math.PI;函数 square(x) { return (x*x); } 函数 sqrt(x) { 返回 Math.sqrt(x); } 函数 round(x) { return Math.round(x); } 函数 rand(x,y) { return (round(Math.random()*(yx)) + x); } 函数 cos(x) { 返回 Math.cos(x) } 函数 sin(x) { 返回 Math.sin(x) } 函数 degToRad(x) { 返回 ( x/(360/(2*pi)) ); } 函数 radToDeg(x) { return ( x*(360/(2*pi)) ); } 函数 atan(s,t) { if( s == 0.0 && t > 0.0) 角度 = 90.0;否则 if(s == 0.0 && t < 0.0) 角度 = 270.0;否则 if (s < 0.0 ) 角度 = 180.0 + radToDeg(Math.atan(t/s));否则 if (s > 0.0 && t < 0.0) 角度 = 360.0 + radToDeg(Math.atan(t/s));否则 { if(s==0.0) s=0.00001;角度 = radToDeg(Math.atan(t/s)); if(角度 < 0.0) 角度 += 360.0;返回角; } //获取页面尺寸 if(document.all) pageWidth = document.body.offsetWidth-20;否则页面宽度=内部宽度; if(document.all) pageHeight = document.body.offsetHeight-4;否则页面高度=内部高度; //创建主菜单 var menu = new menuObject("menu",pageWidth/2,pageHeight/2,"DhtmlCentral Site Map",pageHeight/2);菜单.startAngle = -90; //显示菜单和标题 menu.show();菜单.showCaption(); //添加子菜单 menu.addItem("news","window.open('/news')"); menu.addItem("脚本","切换"); menu.addItem("教程","切换"); menu.addItem("论坛","切换"); menu.addItem("资源","切换"); menu.subMenus[1].addItem("FoldOutMenu","window.open('/script/script22.asp')"); menu.subMenus[1].addItem("加载栏","window.open('/script/script17.asp')"); menu.subMenus[1].addItem("窗口脚本","window.open('/script/script16.asp')"); menu.subMenus[1].addItem("PageSlideFade","window.open('/script/script15.asp')"); menu.subMenus[1].addItem("圆形菜单","window.open('/script/script14.asp')"); menu.subMenus[1].addItem("动画介绍","window.open('/script/script9.asp')"); menu.subMenus[1].addItem("NewsSlideFade","window.open('/script/script10.asp')"); menu.subMenus[1].addItem("其他脚本","window.open('/script/')"); menu.subMenus[2].addItem("vs5 浏览器脚本","window.open('/tutorials/tutorial5.asp')"); menu.subMenus[2].addItem("制作Dhtml脚本","window.open('/tutorials/tutorial6.asp')"); menu.subMenus[2].addItem("滤镜和转场","window.open('/tutorials/tutorial4.asp')"); menu.subMenus[2].addItem("Dhtml 库","window.open('/tutorials/tutorial3.asp')"); menu.subMenus[2].addItem("文档大小","window.open('/tutorials/tutorial2.asp')"); menu.subMenus[2].addItem("Dhtml 简介","window.open('/tutorials/tutorial1.asp')"); menu.subMenus[3].addItem("论坛列表","window.open('/forums')"); menu.subMenus[3].addItem("酷站","window.open('/forums/forum.asp?FORUM_ID=1&CAT_ID=1&Forum_Title=Cool+sites')"); menu.subMenus[3].addItem("CoolMenus","window.open('/forums/forum.asp?FORUM_ID=2&CAT_ID=1&Forum_Title=CoolMenus')"); menu.subMenus[3].addItem("跨浏览器","window.open('/forums/forum.asp?FORUM_ID=3&CAT_ID=1&Forum_Title=Crossbrowser+DHTML')"); menu.subMenus[3].addItem("脚本","window.open('/forums/forum.asp?FORUM_ID=4&CAT_ID=1&Forum_Title=DHTML+Scripts')"); menu.subMenus[3].addItem("常规","window.open('/forums/forum.asp?FORUM_ID=6&CAT_ID=1&Forum_Title=常规+DHTML+问题')"); menu.subMenus[3].addItem("离题","window.open('/forums/forum.asp?FORUM_ID=9&CAT_ID=1&Forum_Title=Off%2Dtopic')"); c = menu.subMenus[4].addItem("酷站点","切换"); c.startAngle = 15; menu.subMenus[4].addItem("门户","window.open('/resources/default.asp?catid=7&cattitle=门户')"); menu.subMenus[4].addItem("脚本站点","window.open('/resources/default.asp?catid=1&cattitle=Script+sites')"); menu.subMenus[4].addItem("教程&<br>参考资料","切换"); menu.subMenus[4].subMenus[0].addItem("商业网站","window.open('/resources/default.asp?catid=5&cattitle=商业+网站')"); menu.subMenus[4].subMenus[0].addItem("个人站点","window.open('/resources/default.asp?catid=6&cattitle=个人+站点')"); menu.subMenus[4].subMenus[0].addItem("实验项目","window.open('/resources/default.asp?catid=4&cattitle=Experimental+projects')"); menu.subMenus[4].subMenus[3].addItem("参考文献","window.open('/resources/default.asp?catid=8&cattitle=参考文献')"); menu.subMenus[4].subMenus[3].addItem("教程和文章","window.open('/resources/default.asp?catid=9&cattitle=教程+和+文章')"); //--></script> </body> </html>