【问题标题】:TabIndex doesn't work with input elements in RadWindowTabIndex 不适用于 RadWindow 中的输入元素
【发布时间】:2018-06-01 09:35:10
【问题描述】:

我正在使用 Telerik Rad Window 来显示一些内容。我使用 jQuery 脚本将 4 个动态输入元素插入到 RadWindow 中。

$.each(inputs, function(i, input) {
    $('#table').append('<tr id="' + input.id + '"><td>' + input.desc + '<td><td><input type="text" tabIndex="' + (i+1) + '"/></td></tr>');
});

由于某些原因,当我按下 Tab 按钮时,我无法专注于这些元素,并且 TabIndex 不起作用。

这些不良行为的可能原因是什么?

【问题讨论】:

    标签: javascript jquery kendo-ui telerik


    【解决方案1】:

    试试

    tabindex="0"
    

    这将通过相对于它在 DOM 中的位置来使元素成为焦点。

    尝试手动设置 tabindices 几乎总是一个坏主意。这是一篇不错的文章。

    http://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-24
      • 2011-06-05
      • 1970-01-01
      • 1970-01-01
      • 2015-11-16
      相关资源
      最近更新 更多