这样一个select下拉框:
<body>
<select id="law_question">
<option></option>
</select>
</body>
for(var i=0;i<data.length;i++){
$("#law_question").append("<option value='"+data[i].content+"'>"+data[i].content+"</option>")
}
我想实现选中后触发事件,但是像下面这样写无效:
$("#law_question").select(function(){
alert("您选中的是:"+$(this).val());
})
用的是searchableSelect下拉框插件,jquery版本是1.11.1
这样试试呢?