您现在的位置: 网页制作教程网 >> 网页特效 >> Javascript 教程 >> 文章正文

浮动菜单是如何作出来的mouse事件

作者:天极

来源:天极

热度:

2007-4-14 16:14:19

// 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="/Article/UploadFiles/200704/20070414161553579.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用自己的就行了,没必要用他的。最后希望大家能用好这个特效来装点自己的主页,一定要记得好东东要共享哦!!

上一页  [1] [2] [3] [4] 

我来说两句:

1分 2分 3分 4分 5分
姓名: *


* 请各位网友遵纪守法并注意语言文明。
网站简介 | 联系方式 | 意见建议 | 版权说明
Copyright © 2007 All rights reserved
滇ICP备06006992号