-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path事件修饰符.html
45 lines (37 loc) · 1 KB
/
事件修饰符.html
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
45
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
.app{
width: 200px;
height: 100px;
background-color: aqua
}
</style>
</head>
<body>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<div id="#app">
<input type="button" class="up" @click="up()" :value="button1"></input>
</div>
<script>
var vum = new Vue({
el: '#app',
data: {
button1:"上层",
button2:"下层"
},
methods: {
up(){
this.button2="上层变了"
},
down(){
this.button2="下层变了"
}
}
});
</script>
</body>
<html>