Home  >  Article  >  Web Front-end  >  Analysis of the serial number limit of the ol element in the html document

Analysis of the serial number limit of the ol element in the html document

高洛峰
高洛峰Original
2017-03-08 15:36:181198browse

Generally speaking, it is unlikely to encounter a huge

    list in an HTML document. This article is just a purely technical discussion.

    I happened to encounter this problem and tested it.

    The measured limit is [-2147483648, 2147483647], that is, [ - 2^31 ~ 2^31 - 1 ]

    The browser is slightly different.

    On IE10 and Firefox, after the serial number reaches the positive limit value 2147483647, the serial numbers of subsequent list items are all the positive limit value 2147483647 and remain unchanged.

    ##2147483645. a

    2147483646. b
    2147483647. c
    2147483647. d
    2147483647. e
    2147483647. f

    On Chrome, the serial number reaches the limit positive value 214748 After 3647 , the next serial number will become the extreme negative value -2147483648, and subsequent ones will be incremented by -2147483647, -2147483646,...

    2147483645. a

    2147483646. b
    2147483647. c
    -2147483648. d
    -2147483647. e
    -2147483646. f

    The above is the detailed content of Analysis of the serial number limit of the ol element in the html document. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn