panpan 发表于 2020-12-31 10:57:49

select在新窗口中打开超链接

select在新窗口中打开超链接

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>select加链接</title>
</head>
<body>
<SCRIPT language=javascript>
<!--
// open the related site windows
function mbar(sobj) {
var docurl =sobj.options.value;
if (docurl != "") {
open(docurl,'_blank');
sobj.selectedIndex=0;
sobj.blur();
}
}
//-->
</SCRIPT>
<Select onchange=mbar(this) name="select">
<OPTION selected>=== 网址导航 ===</OPTION>
<OPTION value="http://www.panpan.org">盼盼资源网</OPTION>
<OPTION value="http://www.panpan.org">盼盼资源网</OPTION>
<OPTION value="http://www.panpan.org">盼盼资源网</OPTION>
</Select>
</body>
</html>

页: [1]
查看完整版本: select在新窗口中打开超链接