当前位置: 首页 > 图文教程 > 网络编程 > Javascript > 会自动逐行上升的文本框

Javascript
总结一些js自定义的函数
与ClientWidth有关的一点资料
对联广告 flash版
连接文字不停变色
一条一条新闻向上的滚动 不错
Ctrl + Enter提交前检测的代码
对联广告 可关闭
一些很实用且必用的小脚本代码
巧妙破除网页右键禁用的十大绝招
实用javaScript技术-屏蔽类
静态的动态续篇之来点XML
显示行号的文本输入框
仿DVBBS下拉菜单效果 修正无错
移到这里,就会自动点击
让iframe框架网页在任何浏览器下自动伸缩
[原创]用srcElement实现添加效果
Javascript客户端脚本的设计和应用
解决 FireFox 下[使用event很麻烦] 的问题.
打字效果
简单的防盗链功能代码(iframe)

Javascript 中的 会自动逐行上升的文本框


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 83 ::
收藏到网摘: n/a

<HTML>
<HEAD>
<META http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>会自动逐行上升的文本框</TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function selectScroller(n) {
optlist = document.scrollform.scroller;
optlist[optlist.length] = new Option(optlist[0].text, "", false, false);
optlist[0] = null;
optlist.selectedIndex = -1;
n = (n + 1) % optlist.length;
// change the speed below: 1000 = 1 second.
setTimeout("selectScroller("+n+")",2000);
}
// End -->
</script>


</HEAD>
<BODY OnLoad="selectScroller(0);">

<center>
<form name="scrollform">
<select name="scroller" size=8>
<option>
<option>
<option>
<option>
<option>
<option>
<option>
<option>
<option>This select option list will
<option>scroll text by copying
<option>the top line to the bottom
<option>line before deleting the
<option>top line. This moves the
<option>options up one line and
<option>gives the impression of
<option>scrolling.
<option>
<option>You can leave as many
<option>blank lines as you feel
<option>necessary to give the
<option>look of begining and
<option>ending.
<option>
<option>This script was written
<option>in response to those
<option>who wanted a news
<option>scroller to work within
<option>a table's cell and for
<option>those who want old
<option>browsers to also see
<option>a scoller on the page.
<option>
<option>
</select>
</form>
</center>

</BODY></HTML>