-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc11.html
37 lines (32 loc) · 803 Bytes
/
c11.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>魏有仪 v-show</title>
<script type="text/javascript" src="./vue.js">
</script>
</head>
<body>
<div id="app">
<img src="./preview.jpg" width="778" height="778" v-show="true">
<button type="button" @click="changeShow">改变</button>
<img src="./preview.jpg" width="778" height="778" v-show="isShow">
<img src="./preview.jpg" width="778" height="778" v-show="age >= 18">
</div>
<script type="text/javascript">
var app = new Vue({
el:"#app",
data:{
isShow:false,
age:16
},
methods:{
changeShow:function(){
this.isShow = !this.isShow;
}
}
});
</script>
</body>
</html>