+ 1

How event works? Anybody plz explain for me..thnx

I don't have any idea about how event work in js

28th Nov 2016, 10:19 PM
Tanaji Kolekar
Tanaji Kolekar - avatar
1 Resposta
+ 2
event in javascript works as follows in the script whenever there's attachment of eventlistener it registers in the dom element as the target it is attached to. now whenever it gets notified that event in the client happened it triggers the set function if you are asking how to use button.addEventListenr("click",clicked(event)); function clicked(event){ document.write(event.pageX+" "+event.pageY) ; }
29th Nov 2016, 7:05 AM
Sandeep Chatterjee