<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function performTest() | |
{ | |
var selectionRange = Selection_get(); | |
var clonedElements = Range_cloneContents(selectionRange); | |
Selection_clear(); | |
DOM_deleteAllChildren(document.body); | |
for (var i = 0; i < clonedElements.length; i++) | |
DOM_appendChild(document.body,clonedElements[i]); | |
} | |
</script> | |
</head> | |
<body> | |
<p>Here is [some text]</p> | |
</body> | |
</html> |