315146-1.xhtml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" class="reftest-wait">
  5. <head>
  6. <script type="text/javascript"><![CDATA[
  7. function DeleteRow(container) {
  8. if (container.firstChild)
  9. container.removeChild(container.firstChild);
  10. }
  11. function AddRow(container) {
  12. var tr = document.createElement("tr");
  13. var td = document.createElement("td");
  14. td.appendChild(document.createTextNode("A cell"));
  15. tr.appendChild(td);
  16. container.appendChild(tr);
  17. }
  18. function doTest() {
  19. for (var i = 0; i < 10; ++i) {
  20. document.body.offsetWidth;
  21. AddRow(document.getElementById('table'));
  22. document.body.offsetWidth;
  23. DeleteRow(document.getElementById('table'));
  24. }
  25. document.documentElement.className = '';
  26. }
  27. ]]></script>
  28. </head>
  29. <body onload="doTest()">
  30. <table id="table" border="5"><tr><td>A cell</td></tr></table>
  31. </body>
  32. </html>