<!DOCTYPE html>
<html lang="en-US">
<body>
<p id="point">Click the button to remove this content.</p>
<button onclick="myFunction()">Remove content</button>
<script>
var x = document.getElementById("point");
function myFunction(){
var range = document.createRange();
range.selectNodeContents(x);
range.deleteContents();
}
</script> </body>
</html>