Error in event handler for (unknown): TypeError: Cannot read property 'checked' of null

时间:2017-08-05 12:05:21

标签: javascript

the run results is ok,but I don't know why come out this mistake.thanks. the browser is Chrome. Error:Error in event handler for (unknown): TypeError: Cannot read property 'checked' of null. at Object.SL_BBL_locer

<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Insert title here</title>
    <script type="text/javascript">
        window.onload=function(){
            window.addEventListener('message',function(e){
                var color=e.data;
                console.log(color);
            },false);
            window.frames[0].postMessage('getcolor','http://localhost:8080/HelloWorld/onMessage.jsp');
        }
    </script>
    </head> 
    <body>
            <iframe id="child" src="http://localhost:8080/HelloWorld/onMessage.jsp"></iframe>
    </body>
    </html>

0 个答案:

没有答案