1
+ <!DOCTYPE html>
2
+ < html >
3
+ < head >
4
+ < meta charset ="UTF-8 ">
5
+ < title > vuejs练习</ title >
6
+ </ head >
7
+ < body >
8
+ < div id ="example ">
9
+ < span > Message is: {{ message }}</ span >
10
+ </ br >
11
+ < input type ="text " v-model ="message " placeholder ="edit me " >
12
+ </ br >
13
+
14
+ < input type ="checkbox " id ="checkbox1 " v-model ="checked ">
15
+ < label for ="checkbox1 "> {{ checked }}</ label >
16
+ </ br >
17
+
18
+ < input type ="checkbox " id ="jack " value ="Jack " v-model ="checkedNames ">
19
+ < label for ="jack "> Jack</ label >
20
+ < input type ="checkbox " id ="john " value ="John " v-model ="checkedNames ">
21
+ < label for ="john "> John</ label >
22
+ < input type ="checkbox " id ="mike " value ="Mike " v-model ="checkedNames ">
23
+ < label for ="mike "> Mike</ label >
24
+ </ br >
25
+ < span > Checked names:{{checkedNames | json}}</ span >
26
+ </ br >
27
+
28
+ < input type ="radio " id ="one " value ="One " v-model ="picked ">
29
+ < label for ="one "> One</ label >
30
+ < input type ="radio " id ="two " value ="Two " v-model ="picked ">
31
+ < label for ="two "> Two</ label >
32
+ </ br >
33
+ < span > Picked:{{picked}}</ span >
34
+ </ br >
35
+
36
+ < select v-model ="selected ">
37
+ < option selected > A</ option >
38
+ < option > B</ option >
39
+ < option > C</ option >
40
+ </ select >
41
+ </ br >
42
+ < span > Selected:{{selected}}</ span >
43
+ </ br >
44
+
45
+ < select v-model ="selectedmultiple " multiple >
46
+ < option selected > A</ option >
47
+ < option > B</ option >
48
+ < option > C</ option >
49
+ </ select >
50
+ < br >
51
+ < span > Selected: {{ selectedmultiple | json }}</ span >
52
+ </ br >
53
+
54
+ < select v-model ="selectedoptions ">
55
+ < option v-for ="option in options " v-bind:value ="option.value ">
56
+ {{option.text}}
57
+ </ option >
58
+ </ select >
59
+ < br >
60
+ < span > Selected:{{selectedoptions}}</ span >
61
+ < br >
62
+ </ div >
63
+ < script src ='http://cdn.jsdelivr.net/vue/1.0.26/vue.min.js '> </ script >
64
+ < script src ="index.js "> </ script >
65
+ </ body >
66
+ </ html >
0 commit comments