“Event.CurrentTarget” Respostas de código

Event.CurrentTarget

function hide(e){
  e.currentTarget.style.visibility = 'hidden';
  console.log(e.currentTarget);
  // When this function is used as an event handler: this === e.currentTarget
}

var ps = document.getElementsByTagName('p');

for(var i = 0; i < ps.length; i++){
  // console: print the clicked <p> element
  ps[i].addEventListener('click', hide, false);
}
// console: print <body>
document.body.addEventListener('click', hide, false);

// Click around and make paragraphs disappear
Himanshu Jangid

const data = event.currenttarget.value

event.currentTarget.value
Fragile Falcon

Respostas semelhantes a “Event.CurrentTarget”

Procure respostas de código populares por idioma

Procurar outros idiomas de código