序列中的制表符索引

发布于 2024-09-29 10:10:13 字数 156 浏览 0 评论 0原文

我的表单中有一组文本框和 html 编辑器。 我无法设置正确的选项卡索引。 选项卡索引从第一个文本框移动,跳过中间的所有控件,到达最后一个 html 编辑器,第三个选项卡将我带到地址栏,然后它在所有控件上随机移动。

我现在想要删除所有控件的选项卡索引,然后以编程方式按顺序分配索引。

I have a set of text boxes and html editors in my form.
I am not able to set the proper tab index.
The tab index moves from the first text box and skips all the controls in between and reaches the last html editor and the third tab takes me to the address bar and then it moves randomly all over the controls.

I now want to remove the tab index for all controls and then assign the index in a sequence programmatically.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

惯饮孤独 2024-10-06 10:10:13

嗯,你可以在身体负载上使用 javascript:

var textbox = document.getElementById("textbox");

//removing a attribute such as tabindex
textbox.removeAttribute("tabindex");

使用 jQuery:

$(document).ready(function() { $("textbox").removeAttr('tabindex'); }

in .NET 我认为您可以在 HtmlControl 中使用 Page_Load (带有 runat=server 的文本框)

textbox.Attributes.Remove("tabindex");

Hmmm you could use javascript on body load perhaps:

var textbox = document.getElementById("textbox");

//removing a attribute such as tabindex
textbox.removeAttribute("tabindex");

with jQuery:

$(document).ready(function() { $("textbox").removeAttr('tabindex'); }

in .NET I think you could use Page_Load in your HtmlControl (textbox with runat=server)

textbox.Attributes.Remove("tabindex");
为你拒绝所有暧昧 2024-10-06 10:10:13

您可以在控件上手动分配选项卡索引。无需从其他任何内容中删除选项卡索引。只需从您想要的第一个控件开始,将 TabIndex 指定为 1,然后在列表中向下移动。

You can manually assign tab indexes on your controls. There is no need to remove the tab indexes from anything else. Just start with the control you want to be first, give it a TabIndex of 1, and move down the list.

爱情眠于流年 2024-10-06 10:10:13

单击查看,然后单击 Tab 键顺序。您将看到表单中所有控件的 Tab 键顺序,例如 0、0.1、0.2、1.0。 1.1 等。只需单击数字即可调整 Tab 键顺序。这很容易。

Click View and then Tab Order. You will see Tab Orders for all the controls in your form e.g 0, 0.1, 0.2, 1.0. 1.1 etc. Just click the number to adjust the Tab Order. Its easy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文