-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvents.js
More file actions
57 lines (42 loc) · 1.35 KB
/
Copy pathEvents.js
File metadata and controls
57 lines (42 loc) · 1.35 KB
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
let div=document.querySelector("#parentBox");
// div.onclick=()=>{
// console.log("Yes i am here 2");
// }
// div.onmouseover=()=>{
// console.log('You are inside the div');
// }
//Used for adding Multiple Events
// div.addEventListener("click",()=>{
// console.log("Hello i am here inside Div");
// });
// div.addEventListener("click",()=>{
// console.log("Hello we are here inside Div");
// });
/*Remove AddeventLisner*/
//store for removing Process
// const Handler=()=>{
// console.log("Handler 3");
// }
// div.addEventListener("click",()=>{
// console.log("Handler 1");
// });
// div.addEventListener("click",()=>{
// console.log("Handler 2");
// });
// div.addEventListener("click","Handler");
// div.addEventListener("click",()=>{
// console.log("Handler 4");
// });
// div.removeEventListener("click",'Handler');
//Practice Question->change colour of screen while clicking on Btn
// let Btn1=document.querySelector("#Btn1");
// let theme="light";
// Btn1.addEventListener("click",()=>{
// if(theme=='light'){
// theme="dark";
// document.querySelector("Body").style.backgroundColor="white";
// }else{
// theme='light'
// document.querySelector("Body").style.backgroundColor="black";
// }
// })