How do I implement onchange of <input type=“text”> with jQuery?

后端 未结 14 1108
[愿得一人]
[愿得一人] 2020-11-27 10:15

?

14条回答
  •  一整个雨季
    2020-11-27 11:14

    Here's the code I use:

    $("#tbSearch").on('change keyup paste', function () {
        ApplyFilter();
    });
    
    function ApplyFilter() {
        var searchString = $("#tbSearch").val();
        //  ... etc...
    }
    
    
    

    This works quite nicely, particularly when paired up with a jqGrid control. You can just type into a textbox and immediately view the results in your jqGrid.

提交回复
热议问题