如何使用jQuery获取上一页URL [英] How to get previous page url using jquery
本文介绍了如何使用jQuery获取上一页URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用jquery获取上一页网址?
How to get the previous page url using jquery?
我正在使用以下代码来获取当前页面位置
I am using the following code to get the current page location
$(document).ready(function() {
var pathname = window.location.pathname;
});
推荐答案
易于使用.
$(document).ready(function() {
var referrer = document.referrer;
});
希望它会有所帮助.但是,它并不总是可用.
Hope it helps. It is not always available though.
这篇关于如何使用jQuery获取上一页URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文