<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="js/vue.js"></script>
<title></title>
</head>
<body>
<h1>Template 三种制作模版方法</h1>
<hr>
<div id="app">
{{message}}
</div>
<!--第二种-->
<template id="dd2">
<h2 style="color:red">我是标签模板</h2>
</template>
<!--第三种-->
<script type="x-template" id="dd3">
<h2 style="color:red">我是script模板</h2>
</script>
<script type="text/javascript">
var app=new Vue({
el:'#app',
data:{
message:'hello Vue!'
},
template:"#dd3"
//第一种
// template:`
// <h2 style="color:red">我是选项模板</h2>
// `
})
</script>
</body>
</html>