JS任务栏滚动效果问题
<
html
>
< head >
< script language ="javascript" > ...
var str = "******123456*******";
var strlen = str.length;
var inc = 0;
var show = "";
function time()
...{
inc = (inc + 1) % strlen;
show = str.substr(inc, strlen - inc);
if (inc > 0)
...{
show += str.substr(0, inc - 1);
window.status = "第一位是第"+inc+"个字符:"+show;
}
window.setTimeout("time();", 200);//定时调用本身
}
//window.setTimeout("time();", 200);
</ script >
</ head >
< body >
</ body >
</ html >
< script langugae ="javascript" > ...
time()
</ script >
< head >
< script language ="javascript" > ...
var str = "******123456*******";
var strlen = str.length;
var inc = 0;
var show = "";
function time()
...{
inc = (inc + 1) % strlen;
show = str.substr(inc, strlen - inc);
if (inc > 0)
...{
show += str.substr(0, inc - 1);
window.status = "第一位是第"+inc+"个字符:"+show;
}
window.setTimeout("time();", 200);//定时调用本身
}
//window.setTimeout("time();", 200);
</ script >
</ head >
< body >
</ body >
</ html >
< script langugae ="javascript" > ...
time()
</ script >