例子:
获得ifream的对象,并把ifreame中页面<div id="my">隐藏掉
test1.html
<html>
<head>
<script>
function t(){
var dd = document.all('test2').contentWindow.document;
dd.getElementById('my').style.display='none';
}
</script>
</head>
<body >
<input type="button" value="test" onClick="t();"/>
<iframe id="test2" name="test2" src="test2.html"></iframe>
</body>
</html>
test2.html
<html>
<head>
</head>
<body>
<div id="my" name="my">
测试一下,父窗体可以把我隐藏掉!!!!!!!!
</div>
</body>
</html>