0
我目前正在開發一個應用程序,將通過iframe加載,我有興趣從父站點獲取URL。如何檢查您的網站是否在iframe中加載並獲取父級網址?
我目前正在開發一個應用程序,將通過iframe加載,我有興趣從父站點獲取URL。如何檢查您的網站是否在iframe中加載並獲取父級網址?
top != self
- > true,如果誣陷
top.location.href
- >獲取頂級頁面的URL
window.parent.location.href
- >得到父母