运行 ❯
获取您
的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <p>The "Get date and time" button will run a script in the inline frame.</p> <iframe id="myFrame" src="/tags/demo_iframe_sandbox.htm" sandbox="allow-scripts"> <p>Your browser does not support iframes.</p> </iframe> <p>Click the "Try it" button to display the value of the sandbox attribute.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myFrame").sandbox; document.getElementById("demo").innerHTML = x; } </script> </body> </html>