how to access element in iframe (same domain)

This will only work if the contents of the main page and the iFrame’s page are on the same domain. Otherwise browsers will prevent the action as it is cross site scripting. You can see in your example, XSS prevention will occur as demonstrated

 var g = parent.$('#iframe_add_edit_media').contents().find("body #entry_id");
alert(g.val());

Related posts:

This entry was posted in knowledge, เว็บไซต์. Bookmark the permalink.