a.html:
<iframe id=iframe1 src="b.html" height=100 width=100></iframe>b.html:
<input type=button value=关闭 onclick="parent.iframe1.style.width=0;parent.iframe1.style.height=0;">
<iframe id=iframe1 src="b.html" height=100 width=100></iframe>b.html:
<input type=button value=关闭 onclick="parent.iframe1.style.width=0;parent.iframe1.style.height=0;">
<script>
function closeIfr(){
ifr.innerHTML="";
}
</script>b.htm.....
<a href="javascript:parent.closeIfr()">关闭此iframe</a>