css下拉框内容链接跳转,jsp实现选择下拉框内容跳转

http://www.itjxue.com  2023-01-05 21:07  来源:未知  点击次数: 

HTML有一个下拉框和一个按键,我怎么样才可以把下拉框选择的内容,用按键打开跳转网页

需要用js或者jquery

input type="button" value="确定" /

$(input[type=button]).click(function(){

var site = $("#e1").val();

window.location.href = site;

});

怎么让我的下拉列表选择就跳转到对应地址呀?

select onchange="window.location=this.value;"

option value="a.html"用户管理/option

option value="b.html"用户/option

/select

html下拉框跳转问题

两个下拉框,第一个里面有A,B两个选项,第二个里面有X,Y两个选项。后面有一个按钮。怎么做到选A和X时候点击按钮跳转1.html。选择A和Y的时候跳转2.html。选择B和X跳转3.html。选择B和Y跳转4.html。(bbs.houdunwang.com)

代码如下:

html

head

titleTEST/title

script language="JavaScript"

function openPage(){

var str1 = document.getElementById("set1").value;

var str2 = document.getElementById("set2").value;

if (str1 == 0 str2 == 0){

window.location.href='A.html';

}

if (str1 == 0 str2 == 1){

window.location.href='B.html';

}

if (str1 == 1 str2 == 0){

window.location.href='C.html';

}

if (str1 == 1 str2 == 1){

window.location.href='D.html';

}

}

/script

/head

body

form name="form1"

table

tr

td

select id="set1"

option selected="" value="0"A/option

option value="1"B/option

/select

/td

/tr

tr

td

select id="set2"

option selected="" value="0"X/option

option value="1"Y/option

/select

/td

/tr

/table

br

input type="button" name="btnOK" value="OK" onclick="openPage()" /

/form

/body

/html

自己在写有上面代码的html文件的同一个目录下添加ABCD四个html文件

DIV+CSS 怎样在首页点击不同的文字链接,跳转到内容页指定的位置?

比如跳转到b.html页面中pos的位置:

a href="b.html#pos"跳转/a

其中b.html页面中加个pos的书签,比如a name="pos"指定位置/a

我会一些html css 要怎么弄一个下拉框,并且下拉框点击之后还能跳转到另外一个页面 比如下

这个下拉框的话,

你是指菜单吗,

利用hover的特性完成呀,

然后你的图片用a标签包裹就可以了,

希望能帮到你

如何给CSS下拉菜单添加超链接

问的就有毛病,什么叫给css下拉菜单,css是样式!css有什么下拉菜单!

我觉得你说的是用css给下拉菜单加超链接吧?????OPTION 加不了 样式!

可以挂JS实现SELECTED 页面跳转,但是我不想答非所问!谢谢合作!!

(责任编辑:IT教学网)

更多

推荐mac苹果系统文章