This example works in browsers that support DOM ranges. This example will fail in Internet Explorer.
<html> <head> <title>DOM Range Example</title> <script type="text/javascript"> function deleteContent() { var oP1 = document.getElementById("p1"); var oHello = oP1.firstChild.firstChild; var oWorld = oP1.lastChild; var oRange = document.createRange();