<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
window.onload=function(){
var elem = document.getElementById('baz');
elem.parentNode.removeChild(elem);
}
</script>
</head>
<body>
... foo
<span id="baz">removed</span>bar ...
</body>
</html>