Home > Web Front-end > JS Tutorial > Proof of the statement that IE can only nest 27 levels of tables_javascript skills

Proof of the statement that IE can only nest 27 levels of tables_javascript skills

WBOY
Release: 2016-05-16 19:24:08
Original
1177 people have browsed it

First of all, a correction, only 28 layers are displayed, not 27.
Recursion is used below. You can clearly see that all the table layers you want to create have been created, but when it is displayed, from the 28th layer It just doesn’t show up after that.
As for why it doesn’t show up, I don’t know.


[Ctrl A Select All Note: If you need to introduce external Js, you need to refresh to execute
]


<script> var n = 40; function createTable(pI){ var oTable = document.createElement("TABLE"); oTable.border = 1; oTable.width = 1000 - pI; oTable.height = 1000 - pI; var oTBody = document.createElement("TBODY"); var oTr = document.createElement("TR"); var oTd = document.createElement("TD"); oTd.innerHTML = pI; if(pI<n) oTd.appendChild(createTable(pI+1)); oTr.appendChild(oTd); oTBody.appendChild(oTr); oTable.appendChild(oTBody); document.body.appendChild(oTable); alert(pI) return oTable; } createTable(1); </script>
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