v-model two-way binding
v-once single binding
Code:
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>vue.js 使用v-model v-once</title> <script src="vue.js"></script> </head> <style> </style> <body> <div id="ask"><!- <->VUE not control body and html tags h1 of > {{}} title </ h1 of > < INPUT type = "text" V-Model = "title" > <-! way binding -> < H3 V-Once > {{}} title </ H3 > <! - bound only once -> </ div > < Script > var App = new new Vue ({ // instantiate VUE EL: ' #ask ' , // VUE ask the control of the element id, Data: { title:'ask.mykeji.net', } }); </script> </body> </html>