eicglobal.js
<script defer="true">
function changeTopContent() 
{  
var JstrTopContentHTML = "<div><table width='100%'><tr><td width=60 style='font:12'>最新公告</td><td style='font:12'><marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2'><br><%=getTopString()%></marquee></td><td width=300></td></tr></table></div>";
parent.frames[3].WriteToFrame(5,"TOPBODY VLINK=NAVY LINK=NAVY",JstrTopContentHTML); 
}
window.attachEvent("onload",changeTopContent); 
</script>
如果把上面的代码放在eicglobal.js里,然后在页面引用<!-- #include file = "../eicglobal.js" -->时,就报错"parent.frames.3为空或不是对象"
<script defer="true">
function changeTopContent() 
{  
var JstrTopContentHTML = "<div><table width='100%'><tr><td width=60 style='font:12'>最新公告</td><td style='font:12'><marquee onmouseover='this.stop()' onmouseout='this.start()' scrollAmount='2'><br><%=getTopString()%></marquee></td><td width=300></td></tr></table></div>";
parent.frames[3].WriteToFrame(5,"TOPBODY VLINK=NAVY LINK=NAVY",JstrTopContentHTML); 
}
window.attachEvent("onload",changeTopContent); 
</script>
如果把这个放在当前页面,即不是放在<!-- #include file = "../eicglobal.js" -->里引用出来的,就能正确弹出窗口.
什么原因?希望高手帮忙.谢谢.