简体   繁体   English

为什么 tabindex = 32767 的最大值?

[英]Why is the maximum value for tabindex = 32767?

From MDN Docs :来自MDN 文档

The maximum value for tabindex is 32767 tabindex 的最大值是 32767

I see the number is 2 15 -1, so it's probably related to 16bit or 32bit integers.我看到这个数字是 2 15 -1,所以它可能与 16 位或 32 位整数有关。 But how is this related to HTML?但这与 HTML 有什么关系? Is it a limitation from the browser?这是浏览器的限制吗? Where does this number come from?这个数字是从哪里来的?

This is the maximum value because it's defined this way by the The World Wide Web Consortium (W3C) which is the main international standards organization for the World Wide Web.这是最大值,因为它是由 World Wide Web Consortium (W3C) 以这种方式定义的,W3C 是 World Wide Web 的主要国际标准组织。

http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-tabindex http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#adef-tabindex

They don't specify the reason but probably is related to the limitations of browsers back when the limitations was defined.他们没有说明原因,但可能与定义限制时浏览器的限制有关。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM