jQuery bind() 方法

bind() 方法向被选元素添加一个或多个事件处理程序,以及当事件发生时运行的函数。

案例

jsp 按钮 <button class="btn btn-primary searchButton" type="button">搜索</button>

js:

$("button[type=button].searchButton").bind("click",function(){
        var param = $("#searchData").serializeJson();
        table.reload(tableId,{
              method :'post',
              where :param,
              page:page,
              limit: limit
        });
    });

猜你喜欢

转载自blog.csdn.net/qq_42556903/article/details/84835713