<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function ShowHeader() {
var txt = document.getElementById("header").innerHTML;
var subLen = 0;
var iniTime = 100;
Show();
function Show() {
var len = txt.length;
document.getElementById("header").innerHTML = txt.substring(0, subLen);
subLen++;
if (subLen > len) {
subLen = 1;
document.getElementById("header").innerHTML ='';
window.setTimeout("Show()", 100);
}
else {
window.setTimeout("Show()", 100);
}
}
}
</script>
</head>
<body onload="ShowHeader()">
<form action="">
<label id="header">欢迎注册我们的网站</label>
</form>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function ShowHeader() {
var txt = document.getElementById("header").innerHTML;
var subLen = 0;
var iniTime = 100;
Show();
function Show() {
var len = txt.length;
document.getElementById("header").innerHTML = txt.substring(0, subLen);
subLen++;
if (subLen > len) {
subLen = 1;
document.getElementById("header").innerHTML ='';
window.setTimeout("Show()", 100);
}
else {
window.setTimeout("Show()", 100);
}
}
}
</script>
</head>
<body onload="ShowHeader()">
<form action="">
<label id="header">欢迎注册我们的网站</label>
</form>
</body>
</html>
解决方案 »
- win7 32bit 和 win7 64bit的区别?
- 请教window.open传值问题
- 网页幻灯片——请帮忙补充代码
- Javascript 有什么好的IDE 工具呢?
- 如何设置光标到对应的位置
- table中tr排序问题
- 怎么用实现把一个select列表里的option 拖动到另一格select 里?
- 到底怎么了,晕的不行,帮忙看看,在线等
- 关于正则表达式校验数据的几个问题
- 求助 遍历table取不到数据 ,但是通过行id却能拿到值
- jquery一个插件问题一个地方不明白 高手请进..................
- 我用jquery里的animate方法写个移动,在移动超出div的时候使超出隐藏起来要怎么写
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function ShowHeader() {
var txt = document.getElementById("header").innerHTML;
var subLen = 0;
var iniTime = 100;
function Show() {
var len = txt.length;
document.getElementById("header").innerHTML = txt.substring(0, subLen);
subLen++;
if (subLen > len) {
subLen = 1;
document.getElementById("header").innerHTML ='';
window.setTimeout(function(){Show()}, 100);
}
else {
window.setTimeout(function(){Show()}, 100);
}
}
Show()
}
</script>
</head>
<body onload="ShowHeader()">
<form action="">
<label id="header">欢迎注册我们的网站</label>
</form>
</body>
</html>