<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Vue入门</title> <script src="../vue.js"></script> </head> <body> <div id="root">{{msg}}</div> <script> //创建vue对象 new Vue({ el: "#root",//挂载点,把页面中某个element交给vue接管 data: { //vue实例的数据 msg: "hellow word!" } }); </script> </body> </html>