Home > Web Front-end > HTML Tutorial > Discussion on the numerical limit of the serial number of the ol element in the html document_HTML/Xhtml_Web page production

Discussion on the numerical limit of the serial number of the ol element in the html document_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:39:29
Original
1474 people have browsed it

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], which is [ - 2^31 ~ 2^31 - 1 ]

    Browser specifics are slightly different.

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

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

    On Chrome, after the serial number reaches the extreme positive value 2147483647, the next serial number will become the extreme negative value -2147483648, and subsequent ones will increase on this basis -2147483647, -2147483646,...

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template