解决方案 »
- IE6 中window.print
- 两天了,急,img动态修改src时,为什么每次取img.width时,得到的是切换之前的img的width
- 急......js问题,DX们进来。。。
- 将一个页面中的某个字符串全部替换怎么做呢
- easyui中datagrid分页的问题
- HTML中 怎么用 onmouseover onmouseout 改变改变表格属性呢?
- javascrip有没有类似asp的“response.end”这样的功能??????
- 刷新的问题!请帮忙
- 我的第一个JavaScript问题
- element-ui select allow-create时如何限制创建的新标签的长度
- 为什么不能往回滚动了?
- 如何有效修改Hta显示的Icon图标和Hta标题栏状态栏图标
<html>
<head>
<title>
</title>
<script language = 'javascript'>
function scroll(seed)
{
var msg = "欢迎";
var out = " ";
var c = 1;
if(seed > 100)
{
seed --;
var cmd = "scroll(" + seed + ")";
timerTwo = window.setTimeout(cmd, 100);
}
else if(seed <= 100 && seed > 0)
{
for(c = 0; c < seed; c++)
{
out += " ";
}
out += msg;
seed --;
var cmd = "scroll(" + seed + ")";
window.status = out;
timerTwo = window.setTimeout(cmd, 100);
}
else if(seed <= 0)
{
if(seed < msg.length)
{
document.getElementById("xx").innerHTML=seed;
out += msg.substring(-seed, msg.length);//substring 要小写
seed =100;
var cmd = "scroll(" + seed + ")";
window.status = out;
timerTwo = window.setTimeout(cmd, 100);
}
else
{
window.status = "" ;
timerTwo = window.setTimeout("scroll(100)", 7);
}
}
}
timerONE = window.setTimeout("scroll(100)", 50);
</script>
</head>
<body>
在状态栏不断显示主人的问候
<script language = 'javascript'>
scroll(500);
</script>
<div id="xx"></div>
</body>
</html>
out += msg.substring(-seed, msg.length);//substring 要小写