v-bind
通過v-bind進行屬性系結
v-bind:href, 可以簡寫成 :href
<body> <div id="app"> <a v-bind:href="page">點擊</a> <a :href="page">點擊</a> </div> <script> new Vue({ el:'#app', data:{ page:'https://www.12306.cn/index/' } }) </script> </body>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/151742.html
標籤:JavaScript
下一篇:JavaScript自學筆記(2)---function a(){} 和 var a = function(){}的區別(javascript)
