有什么问题请到<a href='/bbs/forums.php?fid=21'>论坛</a>中发表<br>
<!-- http://www.webjx.com/ -->
<!-- http://bbs.webjx.com/ -->
<!--要完成此效果把如下代码加入到<body>区域中-->
<script language="JavaScript">
<!--
var current = 0
var x = 0
var speed = 200
var speed2 = 5000
function initArray(n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
action = new initArray(4)
action[0]="欢迎光临www.webjx.com!"
action[1]="这里是网页教学网!"
action[2]="你所关注的就是我们所关注的!"
action[3]="再次感谢你的光临!"
function action2() {
var m = action[current]
window.status = m.charAt(x++)
if (x == m.length + 1) {
x = 0
current++
window.status = m
if (current > action.length - 1) {
current = 0
}
setTimeout("action2()", speed2)
}
else {
setTimeout("action2()", speed)
}
}
action2()
//-->
</script>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]