appendsingle.html 468 B

12345678910111213141516171819202122232425262728
  1. <html class="reftest-wait">
  2. <head>
  3. <script>
  4. function boom()
  5. {
  6. document.body.offsetHeight;
  7. var parent = document.getElementById("body");
  8. var newdiv = document.createElement("div");
  9. newdiv.appendChild(document.createTextNode("5"));
  10. parent.appendChild(newdiv);
  11. document.body.offsetHeight;
  12. document.documentElement.className = "";
  13. }
  14. </script>
  15. </head>
  16. <body id="body" onload="boom();">
  17. <div>1</div>
  18. <div>2</div>
  19. <div>3</div>
  20. <div>4</div>
  21. </body>
  22. </html>