-
Notifications
You must be signed in to change notification settings - Fork 0
/
day13.js
60 lines (34 loc) · 915 Bytes
/
day13.js
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
let btn1 = document.querySelector("#btn1")
btn1.addEventListener("click",(event1)=>{
console.log("button 1 was clicked")
// console.log(event1)
// console.log(event1.type)
});
btn1.addEventListener("click",(event1)=>{
console.log("button 1 was clicked 2")
});
const handler3=()=>{
console.log("button 1 was clicked 3")
};
btn1.addEventListener("click",handler3);
btn1.addEventListener("click",(event1)=>{
console.log("button 1 was clicked 4")
});
btn1.removeEventListener("click",handler3);
// btn1.onclick=()=>{
// console.log("btn1 was clicked")
// let a=25;
// a++;
// console.log(a)
// }
let btn2=document.querySelector("#btn2")
btn2.onmouseover=()=>{
console.log("yaho")
}
let div1=document.querySelector("div")
div1.onclick=(e)=>{
console.log(e)
console.log(e.type)
console.log(e.target)
console.log(e.clientX,e.clientY)
}