http://bindzus.wordpress.com/2007/12/24/adding-dynamic-contents-to-iframes/
<html>
<head>
<title>Adding Dynamic Contents to IFrames</title>
<script type="text/javascript" src="IFrame.js"></script>
<script type="text/javascript">
function onPageLoad()
{
var canvas = document.getElementById("canvas");
var iframe = new IFrame(canvas);
var div = iframe.doc.createElement("div");
div.style.width = "50px"; div.style.height = "50px";
div.style.border = "solid 1px #000000";
div.innerHTML = "Hello IFrame!";
iframe.doc.body.appendChild(div);
}
</script>
</head>
<body onload="onPageLoad();">
<div id="canvas" style="border: solid 1px #000000; height: 500px; width: 500px;"></div>
</body>
</html>
No comments:
Post a Comment