how to get the click on anywhere in page of html in js code example Example: function click anywhere javascript document.body.addEventListener('click', fn, true);