开发者

Header location in javascript

is it possible to in javascript like in php header location, if the visitor 开发者_StackOverflow中文版comes from index html alert something? and how ? thank you


if(document.referrer == url){ alert(msg); }

Should do it.


Check the referrer, but you most likely will need the absolute uri, like this:

if (document.referrer == 'http://domain.com/index.html')
    alert('How was the index?');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜