1   1  /  1  页   跳转

帮个忙,谢谢.

帮个忙,谢谢.

大侠们请帮帮忙 这段代码看不懂 ,帮我标注下 好吗 谢谢了
<script LANGUAGE="JavaScript">
var MessageText = "欢迎光临--政府网网站"
var DisplayLength = 260
var pos = 1 - DisplayLength;//这里为什么要这样弄哦
function ScrollInStatusBar(){
var scroll = "";
pos++;//这里是什么意思,是-258吗
if (pos == MessageText.length) pos = 1 - DisplayLength;//这是什么意思哦?我觉得那两个永远不可能相等阿
if (pos<0) {
for (var i=1; i<=Math.abs(pos); i++)
scroll = scroll + "";
scroll = scroll + MessageText.substring(0, DisplayLength - i + 1);
}
else
scroll = scroll + MessageText.substring(pos, pos + DisplayLength);
window.status = scroll;
setTimeout("ScrollInStatusBar()",50);
}
ScrollInStatusBar()
</script>
问题补充:我知道是什么效果 我想知道这效果是怎么算出来的 帮忙标注下好吗
最后编辑2007-02-19 19:40:44
分享到:
gototop
 

谢谢
gototop
 
1   1  /  1  页   跳转
页面顶部
Powered by Discuz!NT