当前位置:主页>教程>网络编程>JSP技术>浮动菜单是如何作出来的mouse事件

浮动菜单是如何作出来的mouse事件
更新时间:2007-07-14 点击: 来源: 天极网



if (snow) {

if (dir == 2) { // Center

moveTo(over,x+offsetx-(width/2),y+offsety);

}

if (dir == 1) { // Right

moveTo(over,x+offsetx,y+offsety);

}

if (dir == 0) { // Left

moveTo(over,x-offsetx-width,y+offsety);

}

}

}

// The Close onMouseOver function for Sticky

function cClick() {

hideObject(over);

sw=0;

}

// Writes to a layer

function layerWrite(txt) {

if (ns4) {

var lyr = document.overDiv.document

lyr.write(txt)

lyr.close()

}

else if (ie4) document.all["overDiv"].innerHTML = txt

if (tr) { trk(); }

}

// Make an object visible

function showObject(obj) {

if (ns4) obj.visibility = "show"

else if (ie4) obj.visibility = "visible"

}

// Hides an object

function hideObject(obj) {

if (ns4) obj.visibility = "hide"

else if (ie4) obj.visibility = "hidden"

}

// Move a layer

function moveTo(obj,xL,yL) {

obj.left = xL

obj.top = yL

}

function trk() {

if ( (ns4) || (ie4) ) {

nt=new Image(32,32); nt.src="http://www.nedstat.nl/cgi-bin/nedstat.gif?name=ol2t";

bt=new Image(1,1); bt.src="http://webdesign.chinaitlab.com/UploadFiles_8014/200605/20060512113425323.gif";

refnd=new Image(1,1); refnd.src="http://www.nedstat.nl/cgi-bin/referstat.gif?name=ol2t&refer="+escape(top.document.referrer);

}

tr = 0;

}

附overlib.css:

body {font-family:"宋体";font-size: 9pt; margin-top: 0px }

a {font-family:"宋体";font-size: 9pt }

td { FONT-SIZE: 9pt ; font-family: "宋体" }

#PCL {

font-family: 宋体

font-style: none;

font-weight: normal;

text-decoration: none;

font-size: 9pt;

}

#PTT {

font-family: 宋体

font-size: 9pt;

}

#PST {

font-family: 宋体

font-size: 9pt;

}

注:将以上两文件保存为.js文档和css文档,css用自己的就行了,没必要用他的。最后希望大家能用好这个特效来装点自己的主页,一定要记得好东东要共享哦!!




tags:

您可以: 点评它!(0条点评) 分享它!

ARTHD.COM网友点评共有0条点评,点击这里可查看):不能超过250字,请自觉遵守互联网相关政策法规。

广告位



合作伙伴

广告也精彩……

广告也精彩……