When visiting a page with iframe, how to determine whether it is cross-domain or not

I know the same origin policy, and I just want to ask how I can tell whether it is cross-domain or not. Parent.xx or top.xx, in a subdomain will report an error directly when crossing a domain, so how can it avoid reporting an error?

Mar.31,2021

it would be nice to judge whether the domain name in the src attribute of ifame is the same as the domain name of the page where iframe is located.

if you want to judge in iframe, it is recommended to pass in the domain name of the current page as a parameter when setting iframe src, so that you can determine whether it is of the same origin as the caller in iframe.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b394b5-2c18c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b394b5-2c18c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?