[英]Can I combine the .load function with the document.referrer function?
我有一个表单,我希望从用户来源的上一页加载特定的div
。
$(document).ready(function() {
$("#div_to_be_populated").load('url #div');
});
在url中,如何使用document.referrer
function来获取用户来自的url?
您可以像这样使用.load()
和document.referrer
:
$("#div_to_be_populated").load(document.referrer + ' ' + '#divId')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.