使用javascript重定向时引用

使用javascript重定向时引用,javascript,html,redirect,referer,Javascript,Html,Redirect,Referer,我有一个HTML页面a,从中我用窗口打开HTML页面B。打开。然后我将HTML页面B重定向到HTML页面C,但我得到HTML页面A作为参考。我需要以B为参照人进入C页。因为主引用者是Ahtml页面 you can use window.location.href window.location.href example: window.location.href = 'http://www.google.com'; //Will take you to Google. window.o

我有一个HTML页面a,从中我用
窗口打开HTML页面B。打开
。然后我将HTML页面B重定向到HTML页面C,但我得到HTML页面A作为参考。我需要以B为参照人进入C页。

因为主引用者是Ahtml页面

you can use window.location.href



window.location.href example:

window.location.href = 'http://www.google.com'; //Will take you to Google.
window.open()示例:


我使用这个脚本:
code函数newtab(){var w1=window.open('https://www.google.fr');setTimeout(函数(){red(w1);},3000);}函数red(tab){tab.location.assign('https://www.whatismyreferer.com“);}
window.open('http://www.google.com'); //This will open Google in a new window.