1. Installation
Assuming that the development software is vscode,
you can create a new folder, create a js folder inside, and download the code of the vue.js development version from the official website.
Create html documents, automatically generate html structure
1. Enter the exclamation mark in English to select an exclamation mark logo;
2. Enter the exclamation mark and press the tab key.
The sign of successful installation is:
open the browser, open the developer mode, the effect of the console interface is:
Second, use
Introduce the development version of js downloaded from the official website
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="app">
<!-- 变量 -->
{
{message}}
</div>
<script type="text/javascript">
var app=new Vue({
el:'#app',//el元素
data:{//数据
message:'hello vue!',//赋值
}
});
</script>
</body>
</html>
Result: hello vue!
How to create multiple variables