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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -