1.v-text:至關有js的$("#root").text();javascript
2.v-html 至關於js的$("#root").html();html
3.插值賦值的數據會被v-text,或者v-html覆蓋。而且數據會從左到右覆蓋。本例中 v-text 會被v-html覆蓋vue
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <script src="~/Scripts/vue/vue.js"></script> <title>Index</title> </head> <body> <div id="root" v-text="msg" v-html="number">{{msg}}{{number}} </div> </body> </html> <script type="text/javascript"> new Vue({ el: "#root", data: { msg: "hello word", number:123 } }); </script>