运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <meta http-equiv="content-type" content="text/html"> <p>Click the button to change the value of the http-equiv attribute to refresh, and the content attribute to 30 seconds. This will refresh the document every 30 seconds.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { document.getElementsByTagName("META")[0].httpEquiv = "refresh"; document.getElementsByTagName("META")[0].content = "30"; document.getElementById("demo").innerHTML = "The document will refresh every 30 seconds."; } </script> </body> </html>