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
});
});