把<script> 改成 <script defer> 就可以了defer [CI] When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no "document.write" in javascript) and thus, the user agent can continue parsing and rendering. 程序下载完后再进行解析和执行
topfra 也找不到
我把它放在后面,他就根本不执行???
<script>
function window.onload()
{var mainfra=mainframe;
var topfra=topframe;
if(topfra.location=="main_top_up.jsp")
{alert("25")
mainfra.rows="25,*,20";
}
else
{alert("110")
mainfra.rows="110,*,20";
topfra.location="main_top.jsp";
}
}
</script>
<script defer> 也可以的
我不知道defer 是什么意思。
var mainfra=window.document.all.mainframe;
var topfra=window.document.all.topframe;
if(mainfra){
if(topfra){
if(topfra.src=="main_top_up.jsp"){
alert("25")
mainfra.rows="25,*,20";
}else{
alert("110")
mainfra.rows="110,*,20";
topfra.src="main_top.jsp";
}
}
}
}改成这样啦!
你要访问document一下的对象必须有事件触发,不然是找不到对象的。
<script defer> 就可以了defer [CI]
When set, this boolean attribute provides a hint to the user agent that the script is not going to generate any document content (e.g., no "document.write" in javascript) and thus, the user agent can continue parsing and rendering.
程序下载完后再进行解析和执行