window.attachEvent('onload',LoadDiv);
function LoadDiv(){
if (document.getElementById("Bunny2"))
{
document.getElementById("Bunny2").innerHTML='<script type="text/javascript" src="../../inc/BunnyFav.js"></script>s';
document.getElementById("Bunny2").innerHTML='3<scr' + 'ipt type="text/javascript">alert("aaa");</script>s';
}
}
document.onreadystatechange=fnStartInit;
function fnStartInit()
{
if (document.readyState=="complete")
{
try{}
catch(e){}
}
}
这个就是当也面已经全部载入后执行的函数 !
这个不错 代码如下:
<script language="javascript">
function initIt(){document.forms[0].dlmc.focus();}
onload = initIt;
</script>
<form onsubmit ="if(document.forms[0].dlmc.value==''){return false;}parent.location='http://'+document.forms[0].dlmc.value+'.ys168.com';return false;" >
新闻热点
疑难解答