沒(méi)有綁定,點(diǎn)擊bbb沒(méi)有出現(xiàn)"this is beauty",用的subline Text3
<!DOCTYPE html>
<html>
?? ?<head>
?? ??? ?<meta charset="UTF-8">
?? ??? ?<title>屬性綁定和雙向數(shù)據(jù)綁定</title>
?? ??? ?<script src="./vue.js"></script>
?? ?</head>
?? ?<body>
?? ??? ?<!-- title和數(shù)據(jù)項(xiàng)的title進(jìn)行綁定v-bind可以簡(jiǎn)寫(xiě)為: -->
?? ??? ?<div id="root">
?? ??? ??? ?<div :title="title">bbb</div>
?? ??? ??? ?<input />
?? ??? ??? ?<div>{{content}}</div>
?? ??? ?</div>
?? ??? ?<script>
?? ??? ??? ?new Vue({
?? ??? ??? ??? ?el:"#root",
?? ??? ??? ??? ?data:{
?? ??? ??? ??? ??? ?title: "this is beauty",
?? ??? ??? ??? ??? ?content:"this is content"
?? ??? ??? ??? ?}
?? ??? ??? ?})
?? ??? ?</script>
?? ?</body>
</html>
2020-04-15
綁定title的話(huà)是鼠標(biāo)放上去有顯示提示內(nèi)容吧
2019-12-14
不是點(diǎn)擊,是你把鼠標(biāo)放在bbb上會(huì)出現(xiàn)this is beauty,我用了你的代碼,鼠標(biāo)放上可以顯示this is beauty 的。你若想點(diǎn)擊修改bbb的內(nèi)容你還需要寫(xiě)一個(gè)methods。
2019-12-13
<body>
?? ??? ?<!-- title和數(shù)據(jù)項(xiàng)的title進(jìn)行綁定v-bind可以簡(jiǎn)寫(xiě)為: -->
?? ??? ?<div id="root">
?? ??? ??? ?<div :title="title">bbb</div>
?? ??? ??? ?<input />
?? ??? ??? ?<div>{{content}}</div>
?? ??? ?</div>
?? ?</body>
<script>
?? ??? ??? ?new Vue({
?? ??? ??? ??? ?el:"#root",
?? ??? ??? ??? ?data:{
?? ??? ??? ??? ??? ?title: "this is beauty",
?? ??? ??? ??? ??? ?content:"this is content"
?? ??? ??? ??? ?}
?? ??? ??? ?})
?? ??? ?</script>
2019-12-12
<script>里面的內(nèi)容你得放在body外面