源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> </head> <body> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = "Hello JavaScript!"; </script> <noscript>对不起,浏览器不支持 JavaScript!</noscript> <p>浏览器不支持JavaScript将显示写在noscript里面的文本</p> </body> </html>
运行结果