$("select[name='e']").change(function(){ var option_index=this.selectedIndex //获取Select选择的索引 var select_value=$(this).val() //获取Select选择的Valu var select_text=$(this).find("option:selected").text() //获取Select选择的Te alert("获取Select选择的索引值:"+option_index+" 获取Select选择的Value:"+select_value+" 获取Select选择的Text:"+select_text) }) $("#select_id option[text='后来']").attr("selected", true); //设置option selected为true
<form action=""> <input type="text" value="kill" /> <button name="bt" value="bt" >fg</button> <select name="e"> <option value="5" >从前</option> <option value="6">可是</option> <option value="7">后来</option> </select> <input type="submit" value="submit"/> </form>