-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path1_app.html
More file actions
44 lines (41 loc) · 825 Bytes
/
1_app.html
File metadata and controls
44 lines (41 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div id="app">
{{message}}
<ul>
<!-- <li v-for="(val,key) in arr">{{val}} {{key}}</li> -->
<li v-for="(val,key) in json">{{key}} == {{val}} </li>
</ul>
<input type="text" v-model="val"/>
<input type="text" v-bind:value="val"/>
</div>
<script src="vue.js" charset="utf-8"></script>
<script type="text/javascript">
/*
el:挂载点
data:初始化数据
<element v-for="(val,key) in data">{{val}}</elment>
v-model :
只要是表单就使用v-model
*/
new Vue({
el:'#app',
data: {
message: 'Hello Vue!',
arr:[1,2,3,4,5,6],
json:{
name:'leo',
age:8,
job:'Boss'
},
val:''
}
});
</script>
</body>
</html>