代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>mustache语法</title>
</head>
<body>
<div id="app">
<h2> {{message}}+李银河!</h2>
<h2>{{firstname+lastname}}</h2>
<h2>{{firstname+' '+lastname}}</h2>
<h2>{{firstname}} {{lastname}}</h2>
<h2>{{counter*2}}</h2>
</div>
<script src="../js/vue.js"></script>
<script>
const app=new Vue({
el:'#app',
data:{
messgae:"你好啊",
firstname:"rose",
lastname:"donson",
counter:100
}
})
</script>
</body>
</html>