日期:2014-05-16 浏览次数:20417 次
<form action="test1.php" method="post"> <select id="uid" name="uid"> <option value="2">test1</option> <option value="3">test2</option> <option value="4">test3</option> </select> <input value="修改" type="submit"> </form>
$(function() { $("#uid").bind("change", function() { alert(this.attr('value')); }); });
<select id="uid" name="uid" onchange="alert(this.value)"> <option value="2">test1</option> <option value="3">test2</option> <option value="4">test3</option> </select>
------解决方案--------------------
$(function() {
$("#uid").bind("change", function() {
alert($(this).attr('value'));
});
});
这样