运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The iframe sandbox attribute</h1> <iframe src="demo_iframe_sandbox.htm" sandbox> <p>Your browser does not support iframes.</p> </iframe> <p>The "Get date and time" button will run a script in the inline frame.</p> <p>Since the sandbox attribute is set, the content of the inline frame is not allowed to run scripts.</p> <p>You can add "allow-scripts" to the sandbox attribute, to allow the JavaScript to run.</p> </body> </html>