繁体   English   中英

我可以将 .load function 与 document.referrer function 结合起来吗?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM