哪位高人帮帮忙!!

matianyi 2003-08-21 08:06:48
请问哪里有类似如下论坛的左面菜单的js源码!!
http://club.amteam.org/club/bbs/bbsView.asp?boardid=48
谢了!!!
...全文
43 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
matianyi 2003-08-21
  • 打赏
  • 举报
回复
这个还是不太一样啊,有没有完整一点的!
zhaoweiwei 2003-08-21
  • 打赏
  • 举报
回复
<script language="JavaScript">
<!--
function MM_timelinePlay(tmLnName, myID) {
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
if (myID == tmLn.ID) { //if Im newest
setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
fNew = ++tmLn.curFrame;
for (i=0; i<tmLn.length; i++) {
sprite = tmLn[i];
if (sprite.charAt(0) == 's') {
if (sprite.obj) {
numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
keyFrm=1;
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr != props.length) {
if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
} else {
while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
} } } } }
} else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
if (fNew > tmLn.lastFrame) tmLn.ID = 0;
} }
}
//-->
</script>
<script language="JavaScript">
<!--
function MM_timelineGoto(tmLnName, fNew, numGotos) { //v1.2
//Copyright 1997 Macromedia, Inc. All rights reserved.
var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
tmLn = document.MM_Time[tmLnName];
if (numGotos != null)
if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
jmpFwd = (fNew > tmLn.curFrame);
for (i = 0; i < tmLn.length; i++) {
sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back
if (sprite.charAt(0) == "s") {
numKeyFr = sprite.keyFrames.length;
firstKeyFr = sprite.keyFrames[0];
lastKeyFr = sprite.keyFrames[numKeyFr - 1];
if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
for (j=0; j<sprite.values.length; j++) {
props = sprite.values[j];
if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
if (sprite.obj != null) {
if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
else sprite.obj[props.prop2][props.prop] = props[propNum];
} } } }
tmLn.curFrame = fNew;
if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}
//-->
</script>
<div id="Layer1" style="position:absolute; width:77px; height:57px; z-index:1; left: 0px; top: 150px; visibility: inherit">
<table border="0" cellpadding=0 cellspacing=0 width="120" bordercolor="#9c9cff">
<tr>
<td width="50" bgcolor="#FF00FF">
<div align="center"><font size=-1><a href="javascript:if(confirm('http://www.163.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.163.com/'" tppabs="http://www.163.com/" target="bot">网易</a></font></div>
</td>
<td width="14"><a href="#" onClick="MM_timelineGoto('Timeline1','1');MM_timelinePlay('Timeline1')"><img src="left1.gif" tppabs="http://www.coolyouth.net/baron/dao/left1.gif" width="12" height="12" alt="隱藏" border="0"></a></td>
</tr>
<tr>
<td width="50" bgcolor="#FF00FF">
<div align="center"><font size=-1><a href="javascript:if(confirm('http://www.sina.com.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.sina.com.cn/'" tppabs="http://www.sina.com.cn/" target="bot">新浪</a></font></div>
</td>
<td align=center width="14" rowspan="2" bgcolor="#FF00FF"><font size="-1" color="#00FFFF">目錄</font></td>
</tr>
<tr>
<td width="50" bgcolor="#FF00FF">
<div align="center"><font size=-1><a href="javascript:if(confirm('http://www.yahoo.com.cn/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.yahoo.com.cn/'" tppabs="http://www.yahoo.com.cn/" target="bot">雅虎</a></font></div>
</td>
</tr>
<tr>
<td width="50" bgcolor="#FF00FF">
<div align="center"><font size=-1><a href="javascript:if(confirm('http://www.sohu.com/ \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.sohu.com/'" tppabs="http://www.sohu.com/" target="bot">搜狐</a></font></div>
</td>
<td width="14"><a href="#" onClick="MM_timelineGoto('Timeline2','1');MM_timelinePlay('Timeline2')"><img src="right1.gif" tppabs="http://www.coolyouth.net/baron/dao/right1.gif" width="12" height="12" alt="顯示" border="0"></a></td>
</tr>
</table>
</div>
zhaoweiwei 2003-08-21
  • 打赏
  • 举报
回复
脚本说明:
把如下代码加入<body>区域中:
<script language="JavaScript">
<!--
function MM_initTimelines() {
var ns = navigator.appName == "Netscape";
document.MM_Time = new Array(2);
document.MM_Time[0] = new Array(1);
document.MM_Time["Timeline1"] = document.MM_Time[0];
document.MM_Time[0].MM_Name = "Timeline1";
document.MM_Time[0].fps = 15;
document.MM_Time[0][0] = new String("sprite");
document.MM_Time[0][0].slot = 1;
if (ns)
document.MM_Time[0][0].obj = document["Layer1"];
else
document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;
document.MM_Time[0][0].keyFrames = new Array(1, 10);
document.MM_Time[0][0].values = new Array(5);
document.MM_Time[0][0].values[0] = new Array(10,-2,-14,-27,-39,-51,-63,-76,-88,-100);
document.MM_Time[0][0].values[0].prop = "left";
document.MM_Time[0][0].values[1] = new Array(150,150,150,150,150,150,150,150,150,150);
document.MM_Time[0][0].values[1].prop = "top";
if (!ns) {
document.MM_Time[0][0].values[0].prop2 = "style";
document.MM_Time[0][0].values[1].prop2 = "style";
}
document.MM_Time[0][0].values[2] = new Array("inherit","inherit");
document.MM_Time[0][0].values[2].prop = "visibility";
if (!ns)
document.MM_Time[0][0].values[2].prop2 = "style";
document.MM_Time[0][0].values[3] = new Array(127,127,127,128,128,128,129,129,129,130);
document.MM_Time[0][0].values[3].prop = "width";
if (!ns)
document.MM_Time[0][0].values[3].prop2 = "style";
document.MM_Time[0][0].values[4] = new Array(57,59,62,64,67,69,72,74,77,80);
document.MM_Time[0][0].values[4].prop = "height";
if (!ns)
document.MM_Time[0][0].values[4].prop2 = "style";
document.MM_Time[0].lastFrame = 10;
document.MM_Time[1] = new Array(1);
document.MM_Time["Timeline2"] = document.MM_Time[1];
document.MM_Time[1].MM_Name = "Timeline2";
document.MM_Time[1].fps = 15;
document.MM_Time[1][0] = new String("sprite");
document.MM_Time[1][0].slot = 1;
if (ns)
document.MM_Time[1][0].obj = document["Layer1"];
else
document.MM_Time[1][0].obj = document.all ? document.all["Layer1"] : null;
document.MM_Time[1][0].keyFrames = new Array(1, 10);
document.MM_Time[1][0].values = new Array(5);
document.MM_Time[1][0].values[0] = new Array(-100,-89,-78,-67,-56,-44,-33,-22,-11,0);
document.MM_Time[1][0].values[0].prop = "left";
document.MM_Time[1][0].values[1] = new Array(150,150,150,150,150,150,150,150,150,150);
document.MM_Time[1][0].values[1].prop = "top";
if (!ns) {
document.MM_Time[1][0].values[0].prop2 = "style";
document.MM_Time[1][0].values[1].prop2 = "style";
}
document.MM_Time[1][0].values[2] = new Array("inherit","inherit");
document.MM_Time[1][0].values[2].prop = "visibility";
if (!ns)
document.MM_Time[1][0].values[2].prop2 = "style";
document.MM_Time[1][0].values[3] = new Array(130,130,130,130,130,130,130,130,130,130);
document.MM_Time[1][0].values[3].prop = "width";
if (!ns)
document.MM_Time[1][0].values[3].prop2 = "style";
document.MM_Time[1][0].values[4] = new Array(80,80,80,80,80,80,80,80,80,80);
document.MM_Time[1][0].values[4].prop = "height";
if (!ns)
document.MM_Time[1][0].values[4].prop2 = "style";
document.MM_Time[1].lastFrame = 10;
for (i=0; i<document.MM_Time.length; i++) {
document.MM_Time[i].ID = null;
document.MM_Time[i].curFrame = 0;
document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
}
}
//-->
</script>

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧