Hello,
I am trying to delete a selection of nodes as follows:
Code:
newRange = document.selection.createRange();
newRange.selectNodeContents(document.getElementById("id"));
newRange.deleteContents();
But I get a javascript error on line2:
Object doesn't support this property or method.
Could anyone please tell how do I delete all the children and sub children of a tag in an Html document?
Thanks a lot!