跳转菜单如何实现新窗口打开连接

来源:互联网 发布:域名注册哪里好 编辑:程序博客网 时间:2024/05/22 12:07

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>跳转菜单</title>
<script language="JavaScript"type="text/JavaScript">
<!--
function MM_jumpMenu(selObj,restore){ //v3.0
 window.open(selObj.options[selObj.selectedIndex].value)
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<form name="form1">
  <select name="menu1"onChange="MM_jumpMenu(this,0)">
   <option value="<a href="http://www.163.com" target="_blank"rel="external">http://www.163.com</a>">网易</option>
   <option value="<a href="http://www.sohu.com" target="_blank"rel="external">http://www.sohu.com</a>">搜狐</option>
   <option value="<a href="http://www.sina.com" target="_blank"rel="external">http://www.sina.com</a>">新浪</option>
  </select>
</form>
</body>
</html>

0 0
原创粉丝点击