【问题标题】:How to use jquery with Jtable's custom input and display()?如何将jquery与Jtable的自定义输入和显示()一起使用?
【发布时间】:2015-12-23 06:33:34
【问题描述】:

显示()

   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。

【问题讨论】:

    标签: javascript jquery jquery-jtable


    【解决方案1】:

    我认为你需要使用eventdelegation technique如下:

    $(document).on("click", "#tow", function(){
       //do something here
    });
    
    $(document).on("click", "#empid", function(){
       //do something here
    });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-03
      • 2017-05-23
      相关资源
      最近更新 更多