📄 select_source.html
字号:
<HEAD><TITLE>Source for Hot Select Menu</TITLE><LINK rel=stylesheet type=text/css HREF=../../style/jsdemo.css></HEAD><BODY BGCOLOR=#CCCCCC MARGINHEIGHT=0 MARGINWIDTH=0 TOPMARGIN=0 LEFTMARGIN=0><TABLE bgColor=#8899aa border=0 cellPadding=4 cellSpacing=0 width=100%> <TR> <TD class=title>  NetProg 2002: Source for Hot Select Menu </TD> </TR> <TR bgColor=black height=10><TD CLASS=menu> </TD></TR></TABLE><DIV CLASS=page><BR><BR><P><CENTER><TABLE BORDER=0 BGCOLOR=#8899aa CELLPADDING=5><TR><TD><TABLE bgcolor=white BORDER=0 CELLPADDING=10><TR><TD><PRE class=codebox><HEAD>
<TITLE>Netprog JavaScript Demos - Hot Select Menu</TITLE>
<H2>Use the select menu to pick a famous quote</H2>
<HR>
<FORM NAME=frm>
<TABLE>
<TR>
<TD VALIGN=TOP>Select a Person:
<SELECT Name=selector size=1 onChange="<SPAN CLASS=code>newquote()</SPAN>">
<OPTION VALUE=0 SELECTED>Yogi Berra
<OPTION VALUE=1>Bill Clinton
<OPTION VALUE=2>Cookie Monster
<OPTION VALUE=3>Dave H.
<OPTION VALUE=4>Anonymous Student
<OPTION VALUE=5>Kermit
</SELECT>
</TD>
<TD WIDTH=50> </TD>
<TD>
<TEXTAREA COLS=50 ROWS=5 NAME=quote>
</TEXTAREA>
</TD>
</TR>
</TABLE>
</FORM>
<SCRIPT><SPAN CLASS=code>
quotes = new Array("The game isn't over til it's over",
"It depends on what the meaning\nof the word is is.",
"COOOOOOOKKKIIIEEE!",
"blah, blah, blah, blah, blah, blah, blah, blah\n" +
"foo\nblah, blah, blah, blah, blah, blah, blah, ...",
"I made cookies, but my dog ate them...",
"It's not easy being green"
);
function showquote(x) {
document.frm.quote.value='"'+quotes[x]+'"';
}
function newquote() {
index = document.frm.selector.selectedIndex;
author = document.frm.selector.options[index].value;
showquote(author);
}
newquote(0);
</SPAN></SCRIPT>
<H2>Use this select to switch to a different JavaScript demo</H2>
<HR>
<FORM NAME=demoform>
<TABLE>
<TR>
<TD VALIGN=TOP>Select a Demo:
<SELECT Name=demoselector size=1 onChange="<SPAN CLASS=code>newdemo()</SPAN>">
<OPTION VALUE=0 SELECTED>Demo Home Page
<OPTION VALUE=1>Cookie Chase
<OPTION VALUE=2>Moving Browser
<OPTION VALUE=3>Active Bullets
<OPTION VALUE=4>Document Object Properties
<OPTION VALUE=5>Background Color
<OPTION VALUE=6>Back Button
<OPTION VALUE=7>DIVs
</SELECT>
</TD>
</TR>
</TABLE>
</FORM>
<SCRIPT><SPAN CLASS=code>
urls = new Array("index.html","cookie.html","windowjump.html",
"activebullet.html", "props.html", "background.html",
"backbutton.html", "divs.html");
function gotourl(x) {
document.location= urls[x];
}
function newdemo() {
index = document.demoform.demoselector.selectedIndex;
num = document.demoform.demoselector.options[index].value;
gotourl(num);
}
</SPAN></SCRIPT>
</PRE></TD></TR></TABLE></TD></TR></TABLE></CENTER></DIV>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -