Why is it that some pages in my web project works simply by using location.href
in the onclick
function while some require me to enter window.location.href
for redirection to work.
I've read out the scope
related aspects related to using window
. prefix to location.href
but I'm still unable to comprehend this fully.
Any information on this will be highly appreciable.
Cheers!