parent.html
=================================
<script language="javascript"> 
<!-- 
function openChild(){ 
 var k = window.showModalDialog("child.html",window,"dialogWidth:335px;status:no;dialogHeight:300px;");

</script> 
<input type ="button" value="转到子页面" onClick="openChild();">
=================================
child.html
=================================
<script language="javascript">
function downloadFile() {   
 
   url = "xxxx.rar";
  var elemIF = document.createElement("iframe");   
  elemIF.src = url;   
  elemIF.style.display = "none";   
  document.body.appendChild(elemIF);   
}
</script> 
<div class="login_center">
       <input type="button" onClick="downloadFile('')" value="点击">
</div>
现在单击onclick事件能下载附件。
但是需要的是页面一载入就想调用downloadFile()方法。
然后这样写 <body onLoad="downloadFile('')"></body>
就发现IE不弹下载附件,如何解决?