Issue
I have an iFrame, content of which is inside another iFrame. I want to get the inside iFrame's src
content. How can I do this using javascript?
Solution
The outer page:
<html>
<body>
<iframe id="ifr1" src="page1.htm"></iframe>
<iframe id="ifr2" src="http://www.google.com"></iframe>
</body>
</html>
page1.htm:
<html>
<body>
<script type="text/javascript">
document.write(parent.document.getElementById('ifr2').src);
</script>
</body>
</html>
Answered By - Joshua Answer Checked By - Candace Johnson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.