Your syntax is off. Your markup is:
<!-- begin snippet: js hide: false -- >
var content=document.body.innerHTML;
alert(content)
<!-- language: lang-css -->
But the Markdown must contain <!-- language: lang-js -->
before the JavaScript segment, eg:
<!-- begin snippet: js hide: false console: true babel: false -- >
<!-- language: lang-js -->
var content=document.body.innerHTML;
alert(content)
<!-- language: lang-css -->
(note: to avoid problems with the snippet actually trying to render in this answer, in the above code blocks, the -- >
at the end of the first line needs to be replaced with -->
)
Result:
var content=document.body.innerHTML;
alert(content)
div#html,div#css,div#js,div#run{
border:1px solid red;
height:80px;
width:80px;
float:left;
}
div#content{
clear:both;
width:400px;
height:200px;
border:1px solid black;
}
textarea{
overflow:auto;
}
<div id='html'>html</div>
<div id='css'>css</div>
<div id='js'>js</div>
<div id='run'>run</div>
<div id='content'>
</div>
When in doubt, start over by pressing the Snippet button (or Control-M) and pasting in the HTML/CSS/JS again.

Also, it helps to only edit the snippet when inside the snippet editor interface - if you try to edit a snippet's content outside the snippet editor, just in the Markdown, it's a lot harder to manage; these sorts of mistakes are easy to make.