3
私はドロップダウンリストを持っていると私はオプションを選択し、私は別のリンクに私を連れて行く)私は別のリンクに私を連れて行くために各オプションをドロップダウンリスト
これは私のコードですが、それは再生されません。
<html>
<head>
<title>
Database Project Winter 2012
</title>
<script>
function goToNewPage(dropdownlist)
{
var url = dropdownlist.options(dropdownlist.selectedIndex).value;
if (url != "")
{
window.open(url);
}
}
</script>
</head>
<body>
<form name="dropdown">
<select name="list" accesskey="E">
<option selected>Select...</option>
<option value="http://www.google.com/">Google</option>
<option value="http://www.search.com/">Search.com</option>
<option value="http://www.dogpile.com/">Dogpile</option>
<select>
<input type=button value="Go" onclick="goToNewPage(document.dropdown.list)">
</form>
</body>
</html>
何を変更しますか?
ありがとうございます! –