<html>
<body>
<h1>iframe sandbox 属性</h1>
<iframe src="/demo/iframe/iframe_sandbox.html" sandbox>
<p>您的浏览器不支持 iframe。</p>
</iframe>
<p>“获取日期和时间”按钮将在 iframe 中运行脚本。</p>
<p>由于设置了 sandbox 属性,因此 iframe 的内容是不允许运行脚本的。</p>
<p>您可以将“allow-scripts”添加到 sandbox 属性中,以允许 JavaScript 运行。</p>
</body>
</html>