文字循环出现

- 中国WEB开发者网络 (http://www.webasp.net)
-- 网页特效 (http://www.webasp.net/javascript/)
--- 文字循环出现 (http://www.webasp.net/javascript/1/576.htm)
-- 发布日期: 2005-06-20
<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 2 个步骤: -->

<!-- 第 1 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY bgcolor="#fef4d9" onLoad="desliza(); return true;">



<!-- 第 2 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<SCRIPT LANGUAGE="JavaScript">

<!-- escondamos
//texto a mostrarse
var mensaje=" >>> 欢 >>> 迎 >>> 你的 >>> 光临";
mensaje+=" >>> 经 >>> 常 >>> 来 >>> 哟";

//fraccion a mostrarse
var ancho=50;

//rutina de mensaje deslizante
function desliza(){
document.forms[0].panel.value=mensaje.substring(mensaje.length-ancho,mensaje.length);
mensaje=mensaje.substring(mensaje.length-1,mensaje.length)+mensaje;
mensaje=mensaje.substring(0,mensaje.length-1);
setTimeout("desliza()",100);
}

// basta de esconder -->

</SCRIPT>
<form>
<INPUT TYPE="text" NAME="panel" VALUE="" SIZE="50">
</form>


webasp.net