-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.html
68 lines (46 loc) · 1.05 KB
/
event.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<script src="./script/vue.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<div class="container">
<div id="app">
<button type="button" class="btn btn-primary" @click="goster('ilker')">goster</button>
<hr>
<button type="button" class="btn btn-primary" v-on:click="artir">artır</button>
<button type="button" class="btn btn-primary" v-on:click="ucerartir(3)">3'er artır</button>
{{counter}}
<hr>
<p v-on:mousemove="guncelleKordinat(2,$event)"> Kordinatlar:{{x}} , :{{y}}</p>
<hr>
<a :href="link">google</a>
</div>
</div>
<script>
new Vue({
el:"#app",
data:{
counter:0,
x:0,
y:0,
link:"https://google.com"
},
methods:{
goster:function(isim){
alert(isim);
},
artir:function()
{
this.counter++;
},
ucerartir:function(step)
{
this.counter=this.counter+step;
},
guncelleKordinat:function(step,event)
{
this.counter=this.counter+step;
this.x=event.clientX;
this.y=event.clientY;
}
}
})
</script>