代码示例:(标识:eg_js_output_write_over)
<!DOCTYPE html>
<html>
<body>

<h2>我的第一张网页</h2>
<p>我的第一个段落。</p>

<button type="button" onclick="document.write(5 + 6)">试一试</button>

</body>
</html>
运行结果: