我目前使用这个JavaScript弹出确认重定向:打开窗口的用户是不是在指定的域
var answer = confirm("If you are joining us through site other than" +
"website.net, .com or .info please hit OK otherwise hit cancel!");
if(answer)
window.open('http://website.net', '_blank');
else
alert("You need to know that it will not work for you well if you don't")
我真的很喜欢的方式来使用这个弹出只有当用户是不是有针对性的页面上。
你的意思是如果引用者是aseanlegacy.net以外的东西? – MMM 2013-04-30 10:42:04
你可以在window.open之前使用条件检查window.location不包含你想要的位置,然后重定向到你的页面:) – 2013-04-30 10:43:13