<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id="app"> {{ message }} </div> <script src="demo.js"></script> </body> </html>
html
var app = new Vue({ el: ‘#app‘, data: { message: ‘Hello Vue!‘ } })
js
两个文件放一个目录下,只要电脑可以联网,即可以得到
Hello Vue!
原文:https://www.cnblogs.com/caoyi/p/11351726.html