使用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.
/*//////////////////////////////////////////////////////////////// // oesTabIndexes: Reorganizes tab indexes on the page. // ////////////////////////////////////////////////////////////////*/ jQuery.fn.oesTabIndexes = function() { var tabindex = 1; $("input:visible, select:visible, button:visible, a:visible").each(function() { $(this).attr("tabindex", tabindex); tabindex++; }); }
以上是关于使用jQuery组织选项卡索引的主要内容,如果未能解决你的问题,请参考以下文章