new Vue({
el : "#app",
data : {
name : 'zhenghui',
age : 20 ,
src : "https://cn.vuejs.org/images/logo.png"
}
})
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!--
练习:
(vue指令 v-once v-html v-bind)
1、输出自己的名字和年龄
2、输出自己名字age*3的结果
3、<img src=" " alt=" "/> 显示网络图片
4、<input type="text" /> 默认输出自己的名字
-->
<div id="app">
<h1>我的名字:{{ name }}</h1>
<h1>我的年龄:{{ age }}</h1>
<p>三倍年龄的结果: {{ age*3 }}</p>
<img v-bind:src="src" alt="" />
<input type="text" v-bind:placeholder="name" />
</div>
img{
width:100px;
}