源代码:
下载代码
AI 编程工具
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>菜鸟教程(runoob.com)</title> </head> <body> <h1>测试浏览器是否支持 template 标签</h1> <script> if (document.createElement("template").content) { document.write("您的浏览器支持 template 标签!"); } else { document.write("您的浏览器不支持 template 标签!"); } </script> </body> </html>
运行结果: