<p>hello</p>
<script type="text/javascript">
document.write("<!--");
</script>
<p>world</p>
<script type="text/javascript">
document.write("-->");
</script>
<p>nihao</p>
I thought the output of this piece of HTML is
hello
nihao
But it turns out as below:
hello
");
nihao
How should I achieve what I expected? What's the problem here?