⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select_source.html

📁 this gives details of the network programming
💻 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>&nbsp 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>&lt;HEAD>
&lt;TITLE>Netprog JavaScript Demos - Hot Select Menu&lt;/TITLE>


&lt;H2>Use the select menu to pick a famous quote&lt;/H2>

&lt;HR>
&lt;FORM NAME=frm>
&lt;TABLE>
&lt;TR>
&lt;TD VALIGN=TOP>Select a Person:
&lt;SELECT Name=selector size=1 onChange="<SPAN CLASS=code>newquote()</SPAN>">
  &lt;OPTION VALUE=0 SELECTED>Yogi Berra
  &lt;OPTION VALUE=1>Bill Clinton
  &lt;OPTION VALUE=2>Cookie Monster
  &lt;OPTION VALUE=3>Dave H.
  &lt;OPTION VALUE=4>Anonymous Student
  &lt;OPTION VALUE=5>Kermit
&lt;/SELECT>
&lt;/TD>
&lt;TD WIDTH=50>&nbsp&lt;/TD>

&lt;TD>
&lt;TEXTAREA COLS=50 ROWS=5  NAME=quote>
&lt;/TEXTAREA>
&lt;/TD>
&lt;/TR>
&lt;/TABLE>
&lt;/FORM>

&lt;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>&lt;/SCRIPT>




&lt;H2>Use this select to switch to a different JavaScript demo&lt;/H2>

&lt;HR>
&lt;FORM NAME=demoform>
&lt;TABLE>
&lt;TR>
&lt;TD VALIGN=TOP>Select a Demo:
&lt;SELECT Name=demoselector size=1 onChange="<SPAN CLASS=code>newdemo()</SPAN>">
  &lt;OPTION VALUE=0 SELECTED>Demo Home Page
  &lt;OPTION VALUE=1>Cookie Chase
  &lt;OPTION VALUE=2>Moving Browser
  &lt;OPTION VALUE=3>Active Bullets
  &lt;OPTION VALUE=4>Document Object Properties
  &lt;OPTION VALUE=5>Background Color
  &lt;OPTION VALUE=6>Back Button
  &lt;OPTION VALUE=7>DIVs
&lt;/SELECT>
&lt;/TD>
&lt;/TR>
&lt;/TABLE>
&lt;/FORM>

&lt;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>&lt;/SCRIPT>






</PRE></TD></TR></TABLE></TD></TR></TABLE></CENTER></DIV>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -