window.open在當前頁面開啟網頁
阿新 • • 發佈:2019-01-03
<head>
<script language="javascript">
function geturl(selurl)
{ if(selurl.value=='') return;
window.open(selsite.options[selsite.selectedIndex].value,"_self");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文件</title>
</head>
<body>
<select name="selsite" class="topsele" style="width:120px" onchange="geturl(this)">
<option value=" " selected>請選擇站點</option>
<option value="http://www.sohu.com">www.wohu.com</option>
<option value="http://www.126.com">www.126.com</option>
</select>
</body>
</html>