display()
hehe:{
display: function (data) {
$t='<button id="tow"></button>';
return $t;
}
输入()
empid:{
input: function (data) {
if (data.record) {
return '<input type="text" id="empid"/>'; }}
$("#tow").click
和$("#empid").click
不起作用。在返回之前绑定点击事件也不起作用。
我可以这样做。
onclick="myfunc(this)"
但我仍然需要jquery。
答案 0 :(得分:1)
我认为您需要使用event
delegation technique,如下所示:
$(document).on("click", "#tow", function(){
//do something here
});
$(document).on("click", "#empid", function(){
//do something here
});