<script src=
"jquery.min.js" type=
"text/javascript"></script>
<script language=
"javascript" type=
"text/javascript">
$(document).ready(function(){
$('#mySelect').change(function(){
alert($(this).children(
'option:selected').val());
var p1=$(
this).children(
'option:selected').val();
//这就是selected的值
var p2=$(
'#param2').val();
//获取本页面其他标签的值
window.location.href=
"xx.php?param1="+p1+
"¶m2="+p2+
"";
//页面跳转并传参
})
})
</script>
<
select id=
"mySelect">
<option value=
"1">one</option>
<option value=
"2" selected=
"selected">two</option>
<option value=
"3">three</option>
</
select>
<input type=
"text" value=
"ooo" name=
"param2" id=
"param2"/>
转载于:https://www.cnblogs.com/zhanghongqiang/p/4097523.html
相关资源:数据结构—成绩单生成器