javascript - window.location.replace(document.URL) not triggering if url contains '#?' at the end -
in sample website, trying redirect page using javascript window.location.replace
method. need refresh page, used document.url
. works well. noticed not working without giving error. found links adds #
in address bar , 1 of javascript add ?
same. @ time code window.location.replace(document.url)
wont execute. due characters in url?
here function(sample)
function sample() { alert(document.url); window.location.replace(document.url); }
the alert showing url http://localhost/something/#?
. , @ time not refresh page.
use of these location.reload(); window.location.reload(); window.location.href=window.location.href
Comments
Post a Comment