代碼如下:
<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"/>