欢迎来到代码驿站!

JavaScript代码

当前位置:首页 > 网页前端 > JavaScript代码

会自动逐行上升的文本框

时间:2021-09-29 08:48:26|栏目:JavaScript代码|点击:

<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>

上一篇:javascript+css实现俄罗斯方块小游戏

栏    目:JavaScript代码

下一篇:js里的prototype使用示例

本文标题:会自动逐行上升的文本框

本文地址:http://www.codeinn.net/misctech/177987.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有