输入框实时搜索

input输入框的change事件,要在input失去焦点的时候才会触发

$('input[name=myInput]').change(function() { ... });

在输入框内容变化的时候不会触发change,当鼠标在其他地方点一下才会触发
用下面的方法会生效,input

[html] view plain copy
$("#input_id").on('input',function(e){ 
alert('Changed!') 
});
原文地址:https://www.cnblogs.com/linsx/p/7703885.html