1、下载vuejs文件
https://cn.vuejs.org/js/vue.js
2、示例代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="vue.min.js"></script>
</head>
<body>
<div id="app">
{{message}}
</div>
<script>
new Vue({
el: '#app',
data: function(){
return {
message: 'Hello World'
}
}
});
</script>
</body>
</html>
效果: