引入vue.js的基础上,用vue实例改变html中绑定id的内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <html> <head> <meta charset="utf-8"> <title></title> <!--引入本地的vue.js--> <script src="vue.js" type="text/javascript" charset="UTF-8"> </script> </head> <body> <div id="app"> {{ message }} </div> <script> var app = new Vue({ el: '#app', data:{ message: 'hello Vue' } }) </script> </body> </html>
|