Javascript 引导表双击行值

Javascript 引导表双击行值,javascript,jquery,bootstrap-4,Javascript,Jquery,Bootstrap 4,我试图在引导表中双击后捕获行值。我不能这样做,并返回我未定义 我的代码 $('#table').on('dbl-click-row.bs.table', function(field, value, row, $el) { if (value != "type") { alert($el.id + "-" + $el.name + "-" + $el.type); } }); 这是我的桌子` 塞兹南省 身份证件 Keyfieldx 长度 ` 请检查此链接您需要设置一个公共类来

我试图在引导表中双击后捕获行值。我不能这样做,并返回我未定义

我的代码

$('#table').on('dbl-click-row.bs.table', function(field, value, row, $el) {
  if (value != "type") {
    alert($el.id + "-" + $el.name + "-" + $el.type);
  }
});

这是我的桌子`
塞兹南省


身份证件
Keyfieldx
长度
`

请检查此链接您需要设置一个公共
类来获取行值

$(文档).ready(函数(){
$(“.jsTableRow”).dblclick(函数(){
log($(this.html());
警报($(this.html());
});
});

引导示例
名字
姓氏
电子邮件
约翰
雌鹿
john@example.com
玛丽
教育部
mary@example.com
七月
杜利
july@example.com

$(document).on('dblclick','here go class or id element',function(field,value,row,$el)谢谢,但是$('#table')。on('dbl-click-row.bs.table','table',function(field,value,row,$el){if(value!=“type”){alert($el.id+“-”+$el.key_fieldx+“-”+$el.type)});不工作您发布的内容不正确请再次查看我的评论或将html添加到您的问题中,以便我们可以为您提供完整的代码共享表的示例!仅供参考:有人将此错误视为缺少事件:
dbl单击行。bs.table
是事件(而不是
dblclick
                        <table  class="table-sm"
                        id="table"
                        data-search="true" 
                        data-filter-control="true"
                        data-visible-search="true"
                        data-pagination="true"
                        data-pagination-h-align="left"
                        data-pagination-detail-h-align="right"

                        data-show-refresh="true"
                        data-show-columns="true">


                        <thead class="thead-light">
                              <tr>
                                <th data-checkbox="true"></th>
                                <th data-field="id"  data-filter-control="input" data-switchable="false">ID</th> 
                                <th data-field="key_fieldx"  data-sortable="true" data-filter-control="input">Keyfieldx</th>
                                <th data-field="delka"  data-sortable="true" data-filter-control="input">length</th>
                              </tr>
                            </thead>
                          </table>`