[英]I need to reload the previous page to 'another URL' when I click on back button in browser
Suppose now I'm in google.com
the I typed facebook.com
in same page then from this page I clicked browser back
button, then I need to load gmail.com
instead of
google.com
. 我需要JavaScript/JQuery code
。
任何人都請幫助解決這個問題。 非常感謝提前....<3
我得到了答案。
<script type="text/javascript">
$(document).ready(function() {
if(performance.navigation.type == 2){
window.location.replace("www.google.com");
}
</script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.