日期:2014-05-16  浏览次数:20309 次

js 下拉框选中跳转

选中后跳转

<script type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>

<form name="form1" id="form1">
  <select name="menu1" onchange="MM_jumpMenu('parent',this,0)">
    <option value="http://www.baidu.com">baidu</option>
    <option value="http://www.sohu.com">sohu</option>
  </select>
</form>