[英]Fetching the domain name for a website from an iframe
我正在使用var url = (window.location != window.parent.location) ? document.referrer:document.location;
var url = (window.location != window.parent.location) ? document.referrer:document.location;
從我的iframe中訪問網站的域名。 出乎意料的是,這項工作! 但是,這對所有情況都適用嗎?
parent.location適用於所有瀏覽器: http : //www.w3schools.com/jsref/prop_win_parent.asp
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.