之前使用 on 的时候一直是
$("").on('click','function(){
}')
之后发现有些时候一直无法绑定(比如元素动态生成时),查看文档后发现正确用法应该是
$(document).on("change","#pageSize_out",function(){
if($("#page_out").val()!=0){
$("#pageSize").val($(this).val());
list();
}
})
同时,注意
As this answers receives a lot of attention, here are two supplementary advises :
1) When it's possible, try to bind the event listener to the most precise el......
阅读全文