点击按钮进入弹出的新无菜单的页面 dn001 2009-06-21 08:34:28 <!--要完成此效果把如下代码加入到<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.knowsky.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>