PDA

View Full Version : MENU LIST



nasr
پنج شنبه 07 خرداد 1383, 21:42 عصر
سلام

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
<script language="JavaScript">

<!-- Begin
function go_to_station() {
if (document.stationform.stationselect.options[0].sel ected) {
window.location.href = "http://www.shop4all.com";}
else if (document.stationform.stationselect.options[1].sel ected) {
window.location.href = "http://www.coomedia.com";}
else if (document.stationform.stationselect.options[2].sel ected) {
window.location.href = "http://www.microsoft.com";}
else if (document.stationform.stationselect.options[3].sel ected) {
window.location.href = "http://www.yahoo.com";}
else if (document.stationform.stationselect.options[4].sel ected) {
window.location.href = "http://www.netscape.com";}
else if (document.stationform.stationselect.options[5].sel ected) {
window.location.href = "http://msdn.microsoft.com";}
return true;
}
function textValue() {
var stationInteger, stationString
stationInteger=document.stationform.stationselect. selectedIndex
stationString=document.stationform.stationselect.o ptions[stationInteger].text
document.stationform.stationtext.value = "Go to " + stationString +"!"
}
// End -->
</script>
</head>
<body>
<center><h1>A Menu List</h1></center>
<center>
<table align="center" bgcolor="#b8860b" cellspacing="2" cellpadding="2" border="2">
<tr>
<td align="center">
<table border="0" cellspacing="2" cellpadding="2" align="CENTER" valign="MIDDLE" bgcolor="#deb887"><tr><td align="CENTER" valign="MIDDLE"><form name="stationform">
<select name="stationselect" onchange="textValue()" multiple size="5">
<option>Shopping Home Page
<option>BDG Home Page
<option>Microsoft Home Page
<option>Yahoo
<option>Netscape
<option>Developer's Page
</select></td></tr>
<tr><td align="CENTER" valign="MIDDLE">
<input type="button" name="stationbutton" value="Go!" onclick="go_to_station()">
</td></tr>
<tr><td align="CENTER" valign="MIDDLE"><input type="text" name="stationtext" value="" size="35" maxlength="35">
<p>
</form></td></tr></table></td>
</tr>
</table></center>
</body>

</html>