addEventListener basic

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

Posted in JS