add EventListener basic Javascript
Share this:

add EventListener

< span id=”elem”>Hello!
< script > elem.addEventListener(‘click’,function(){
alert(‘hello’);
}); </ script >

Recommended For You

Share this: