facebook-squared twitter-squared rss-squared YouTube icon gplus-squared

blueprint-3d Archive



January 2020



Registering JavaScript Events can be Tricky

Written by , Posted in Java Script, Tutorials

When registering JavaScript Events we need to provide the handler. That handler is called when ever a specified event is clicked. function clickHandler() { alert(‘Window is clicked’) } window.addEventListener(‘click’, clickHandler()) The problem with above code is that, we will see the alert as soon as windows loads. The expected result is show alert whenever we […]