纷纭教育
您的当前位置:首页htmlselect标签加链接3种方法_HTML/Xhtml_网页制作

htmlselect标签加链接3种方法_HTML/Xhtml_网页制作

来源:纷纭教育


第一种:

代码如下:



select加链接



// open the related site windows
function mbar(sobj) {
var docurl =sobj.options[sobj.selectedIndex].value;
if (docurl != "") {
open(docurl,'_blank');
sobj.selectedIndex=0;
sobj.blur();
}
}
//-->



第二种:

代码如下:

第三种带跳转按钮的:

代码如下:


select选择-按钮跳转

function setsubmit()
{
if(mylink.value == 0)
window.location='http://www.baidu.com';
if(mylink.value == 1)
window.location='http://www.163.com';
if(mylink.value == 2)
window.location='http://www.sina.com';
}







显示全文