获取 Iframe内的元素对象
例子:获得ifream的对象,并把ifreame中页面<div id="my">隐藏掉
test1.html
<div style="padding-right: 5px; padding-left: 4px; font-size: 13px; border-left-color: #cccccc; padding-bottom: 4px; width: 98%; padding-top: 4px; background-color: #eeeeee;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->
<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" />
<iframe id="test2" name="test2" src="test2.html"></iframe>
</body>
</html>
页:
[1]