-
Notifications
You must be signed in to change notification settings - Fork 0
/
day14.js
45 lines (26 loc) · 904 Bytes
/
day14.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
const var1=document.getElementById("first").addEventListener("click", function(eve){
// alert("yaho!!")
console.log(eve)
console.log(eve.type)
console.log(eve.target)
console.log(eve.clientX)
console.log(eve.clientY)
})
// const var2=document.getElementById("images").addEventListener("click", function(eve){
// // alert("yaho!!")
// console.log("clicked images")
// })
// const var3=document.getElementById("second").addEventListener("click", function(eve){
// // alert("yaho!!")
// console.log("clicked second images")
// eve.stopPropagation();
// })
//attchevent()
document.getElementById("images").addEventListener("click",function(e){
// e.stopPropagation();
// e.preventDefault();
console.log(e.target.parentNode)
let removeit = e.target.parentNode
removeit.remove()
// removeit.parentNode.removeChild(removeit)
})