javascript - Get current URL from IFRAME -


is there simple way current url iframe?

the viewer going through multiple sites. i'm guessing using in javascript.

for security reasons, can url long contents of iframe, , referencing javascript, served same domain. long true, work:

document.getelementbyid("iframe_id").contentwindow.location.href 

if 2 domains mismatched, you'll run cross site reference scripting security restrictions.

see answers similar question.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -