运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <iframe id="myframe" src="demo_iframe.htm"> <p>Your browser does not support iframes.</p> </iframe> <p>Click the button to change the background color of the document in the iframe.</p> <p id="demo"></p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { var x = document.getElementById("myframe"); x.style.backgroundColor = "red"; } </script> </body> </html>