我们如何确定window.history是否来自某个网址,比如www.example.com,然后做一些事情,例如:
if ( //window.history includes example.com string ) { $('.myclassname').hide() }
它实际上需要知道历史记录的链接位置...有没有办法找出来呢?
发布于 2013-02-05 20:32:24
您只能通过document.referer获取referer(用户所在的页面)。您不能从js访问历史记录。
https://stackoverflow.com/questions/14707578
复制相似问题