代码示例:(标识:dhtm_menu3)
<html>
<head>

<script type="text/javascript">

function go()
{
location=document.forms[0].gowhere.value
}

</script>

</head>
<body>

<form>
<select id="gowhere" onchange="go()">
<option>-Select location-</option>
<option value="/asp/index.html">ASP 教程</option>
<option value="/html/index.html">HTML 教程</option>
<option value="/javascript/index.html">JavaScripts 教程</option>
</select>
</form>

</body>
</html>
运行结果: