使用jQuery组织选项卡索引

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用jQuery组织选项卡索引相关的知识,希望对你有一定的参考价值。

Keeping track of complex forms - especially those that exist within multiple jQuery UI tabs - can be a pain. This is a simple little function that will reorganize all visible inputs, buttons, drop-downs and links. Use it whenever switching between tabs or adding new elements to the form.
  1. /*////////////////////////////////////////////////////////////////
  2. // oesTabIndexes: Reorganizes tab indexes on the page. //
  3. ////////////////////////////////////////////////////////////////*/
  4. jQuery.fn.oesTabIndexes = function() {
  5. var tabindex = 1;
  6. $("input:visible, select:visible, button:visible, a:visible").each(function() {
  7. $(this).attr("tabindex", tabindex);
  8. tabindex++;
  9. });
  10. }

以上是关于使用jQuery组织选项卡索引的主要内容,如果未能解决你的问题,请参考以下文章

动态更改活动选项卡索引 jQuery UI 选项卡

jQuery UI 选项卡 - 如何获取当前选定的选项卡索引

如何在 jquery 中自动回发后维护选定的选项卡?

如何重置 WinForms 应用程序上的选项卡索引?

如何在选项卡面板中获取活动选项卡索引?

选项卡索引不起作用richfaces 弹出面板