代码示例:(标识:tag_template_3)
<!DOCTYPE html>
<html>
<body>

<h1>template 元素</h1>

<script>
if (document.createElement("template").content) {
  document.write("您的浏览器支持 template!");
} else {
  document.write("您的浏览器不支持 template!");
}
</script>

</body>
</html>
运行结果: