死循环打开多个窗口,执行就会死机啊 dn001 2009-06-21 08:34:26 <!--要完成此效果把如下代码加入到<body>区域中--> <script language="Javascript"> <!-- var x = 0 var speed = 120 var text = "欢迎光临网页教学网!" var course = 120 var text2 = text function Scroll() { window.status = text2.substring(0, text2.length) if (course < text2.length) { setTimeout("Scroll2()", speed) } else { text2 = " " + text2 setTimeout("Scroll()", speed); } } function Scroll2() { window.status = text2.substring(x, text2.length) if (text2.length - x == text.length) { text2 = text x = 0 setTimeout("Scroll()", speed); } else { x++ setTimeout("Scroll2()", speed); } } Scroll() //--> </script>