W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<!DOCTYPE html> <html> <body> <p id="demo">获取文件以更改此文本。</p> <script> getText("/demo/js/fetch_info.txt"); async function getText(file) { let myObject = await fetch(file); let myText = await myObject.text(); document.getElementById("demo").innerHTML = myText; } </script> </body> </html>