1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
<html> <head> <script> function m() { document.body.offsetHeight; var div = document.getElementById("div"); var doomed = document.getElementById("doomed"); div.removeChild(doomed); } </script> </head> <body onload="m();"> <div id="div"><span>x </span><div id="doomed">y</div><span> x</span></div> </body> </html>