发现的以前不知道的函数
发布时间:2016-12-30 来源:查字典编辑
摘要:window.attachEvent('onload',LoadDiv);functionLoadDiv(){if(document.get...
window.attachEvent('onload',LoadDiv);
functionLoadDiv(){
if(document.getElementById("Bunny2"))
{
document.getElementById("Bunny2").innerHTML='<scripttype="text/javascript"src="../../inc/BunnyFav.js"></script>s';
document.getElementById("Bunny2").innerHTML='3<scr'+'ipttype="text/javascript">alert("aaa");</script>s';
}
}
document.onreadystatechange=fnStartInit;
function fnStartInit()
{
if (document.readyState=="complete")
{
try{}
catch(e){}
}
}
这个就是当也面已经全部载入后执行的函数 !
这个不错复制代码 代码如下:
<scriptlanguage="javascript">
functioninitIt(){document.forms[0].dlmc.focus();}
onload=initIt;
</script>
<formonsubmit="if(document.forms[0].dlmc.value==''){returnfalse;}parent.location='http://'+document.forms[0].dlmc.value+'.ys168.com';returnfalse;">