初学JavaScript,关于函数调用请求纠错

是一个点击事件,点击后全选,在尝试过程中发现点击事件没有响应。求解答。
1. <!DOCTYPE >
1. < html >
1. < head>
1. < meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
1. < title>无标题文档< /title>
1. < script>
1. window.onlaod=function ()
1. {
1. var oBtn1=document.getElementById('btn1');
1. var oDiv=document.getElementById('div1');
1. var aCh=oDiv.getElementsByTagName('input');
1.

1. oBtn1.onclick =function ()
1. {
1. for(i=0; i < aCh.length;i++)
1. {
1. aCh[i].checked =true;
1. }
1. };
1. };
1. < /script>
1. < /head>
1.
1. < body>
1. < input id="btn1" type="button" value="全选"/>
1. < /br>
1. < div id=div1>
1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1. < input type="checkbox" />

1.
1.

window.onload 不是 window.onlaod

拼写错误。

window.onload 不是 window.onlaod

拼写错误。

onlaod写错了,应该是onload

window.onlaod=function (),load拼写错误。没那个函数,当然不会执行

window.onload 不是 window.onlaod

window.onlaod写错了,注意代码的拼写

明显是代码拼写的问题,,下次先在浏览器中f12,,看看控制台中的错误

拼写错误,window.onload

window.onload