求帮我看看哪里错了,谷歌火狐nodename值返回undefined
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <input type="button" id="btn1" value="确定" name="按钮1"> </body> <script type="text/javascript"> function showMes(event){ alert(event.target.nodename) } var btn1=document.getElementById("btn1"); var eventUtil={ //添加句柄 addHandler:function(element,type,handler){ if(element.addEventlistner){ element.addEventlistner(type,handler,false); }else if(element.attachEvent){ element.attachEvent("on"+type,handler); }else{ element["on"+type]=handler; } } } eventUtil.addHandler(btn1,"click",showMes) </script> </html>
谷歌火狐nodename值返回undefined