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
optionThis select option list will
optionscroll text by copying
optionthe top line to the bottom
optionline before deleting the
optiontop line. This moves the
optionoptions up one line and
optiongives the impression of
optionscrolling.
option
optionYou can leave as many
optionblank lines as you feel
optionnecessary to give the
optionlook of begining and
optionending.
option
optionThis script was written
optionin response to those
optionwho wanted a news
optionscroller to work within
optiona table's cell and for
optionthose who want old
optionbrowsers to also see
optiona scoller on the page.
option
option
/select
/form
/center
/BODY/HTML