Tuesday, October 4, 2011

Getting Elements inside iFrame


<html>
<head>
<script>
<!---
function showFrameText() {
    d = document.getElementById("iframeholder");

    alert(d.contentWindow.document.getElementById("atable").innerHTML);
}
//-->
</script>
</head>
<body>
 <iframe src="iframetable.html" id="iframeholder" name="iframeholder">if you see this you have iframes turned off.</iframe>
 <hr>
 <button onclick="showFrameText()">Show Table Text</button>

</body>
</html>

No comments:

Post a Comment