<div id="app"> {{ message }} </div>
new Vue({ el:'#app', data: { message:'Hello World!' } });
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>第一個vue.js</title> <script src="https://unpkg.com/vue@2.4.4/dist/vue.min.js"></script> </head> <body> <div id="app"> <p>{{ message }}</p> </div> <script> new Vue({ el: '#app', data: { message: 'Hello Vue.js!' } }) </script> </body> </html>