今天是:

注册会员|会员登陆|设为首页|加入收藏|广告服务|韩文翻译|RSS阅读|繁體中文

您现在的位置: 韩国设计资源网 >> 设计师学院 >> 网页设计 >> Javascript >> 教程正文

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

  • 作者:未知 文章来源:收集整理 点击数: 更新时间:2006-6-2 22:27:39 用户收藏
TABLE></TD></TR></TABLE>"
layerWrite(txt);
dir = d;
disp();
snow = 0;
}

// Common calls
function disp() {
if ( (ns4) || (ie4) ) {
if (snow == 0) {
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);
}
showObject(over);
snow = 1;
}
}
// Here you can make the text goto the statusbar.
}

// Moves the layer
function mouseMove(e) {
if (ns4) {x=e.pageX; y=e.pageY;}
if (ie4) {x=event.x; y=event.y;}
if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
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

上一页  [1] [2] [3] [4] [5] [6] [7] [8] 下一页