VYBER Z PULL-DOWN (2)

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

111
p111.html / p111.zip
Vybratie plozky z pull-down menu formulara
1122b
NN 4.04, IE 4.0

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<HTML> <HEAD> <title> JavaScript DESTINATION - P111 </title> <SCRIPT LANGUAGE = "JavaScript"> <!-- function MakeArray() { this.length = MakeArray.arguments.length for (var i = 0; i < this.length; i++) this[i+1] = MakeArray.arguments[i] } var siteopt = new MakeArray("Vyberte si stranku", "Titulna strana", "JavaScript v prikladoch", "Prirucka k JavaScriptu", "E-mail"); var url = new MakeArray("", "index.html", "priklady.html", "prirucka.html", "mailto:unknown@unknown.sk?Subject=JavaScript"); function jumpPage(form) { i = form.SelectMenu.selectedIndex; if (i == 0) return; window.location.href = url[i+1]; } // --> </SCRIPT> </HEAD> <BODY> <SCRIPT LANGUAGE = "JavaScript"> <!-- document.writeln('<FORM><TABLE BORDER=0 CELLPADDING=5 CELLSPACING=0><TR><TD>Jednoduche menu</TD></TR><TR><TD>'); document.writeln('<SELECT NAME="SelectMenu" onChange="jumpPage(this.form)">'); tot = siteopt.length; for (var i = 1; i <= tot; i++) document.write("<OPTION>" +siteopt[i]); document.writeln('</SELECT>'); document.writeln('</TD></TR></TABLE></FORM>'); // --> </SCRIPT> </BODY> </HTML>
[ Navrat / BACK ]