v-bind命令是绑定属性的指令
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script src="util/vue-2.4.0.js"></script>
<style>
[v-cloak]{
display: none;
}
</style>
<body>
<div id="test1">
<p v-bind:title="mytitle">{{ msg }}</p>
<!-- v-bind 是绑定属性操作符,=后面的字符串里面vue会按照js代码去执行,支持运算符-->
<!-- v-bind也可省略不写,只写: ,下面的v-bind语句是加上运算符的语句-->
<p v-bind:title="mytitle+'这是尾部新增加的提示'">{{ msg }}</p>
<p :title="mytitle">{{msg}}</p>
</div>
<script>
var vm1 = new Vue({
el:"#test1",
data:{
msg:"鼠标放上来会有提示",
mytitle:"this is my define title "
}
})
</script>
</body>
</html>