<!DOCTYPE html>标签:el,vue,name,写法,绑定,js,012,Vue,root From: https://blog.51cto.com/u_15356972/6085204
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
<div id="root">
<h1>{{name}}</h1>
<lable>单项绑定</lable>
<input type="text" :value="name"><br>
<lable>双向绑定</lable>
<input type="text" v-model="name"><br>
<a :href="url">前往百度</a>
</div>
<script type="text/javascript">
Vue.config.productionTip = false;
const v = new Vue({
//el:'#root', //第一种写法
data:{
name:'虾米大王',
url:'http://www.baidu.com'
}
});
v.$mount('#root'); //代替el,第二种写法
</script>
</body>
</html>