【问题标题】:Get Data attribute from kendo dropdown list in change event从更改事件中的剑道下拉列表中获取数据属性
【发布时间】:2017-10-20 17:44:51
【问题描述】:

我为剑道下拉列表设置数据属性如下。

.HtmlAttributes(new {style = "width:100%", required = "required" ,data_id= item.Id})

我试过这样

$(this).data("id");

但它给出了“未定义”。我如何在更改事件中获取此数据属性值

【问题讨论】:

    标签: kendo-dropdown


    【解决方案1】:

    我使用如下,它适用于我

    this.element.attr('data-id');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-05
      • 2014-03-01
      • 2015-07-04
      • 2013-07-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多