给你个例子自己改吧:
<SELECT name="select" οnchange="window.open(this.options[this.selectedIndex].value,target='_self')">
<OPTION value='file1.htm' selected>网址1</OPTION>
<OPTION value='file2.htm'>网址2</OPTION>
<OPTION value='file3.htm'>网址3</OPTION>
</SELECT>
有多个链接就把<OPTION value='file3.htm'>网址3</OPTION>这行内容多复制几次改一下网址就行了。
上面代码是链接在当前窗口打开,要找开新窗口把target='_self'改为target='_blank'就行了。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/113334.html原文链接:https://javaforall.cn