title: Does chrome support "addEventListener"?
body: <p>When I use chrome to test the Cross-browser event handling, the function does not work.It says that "Uncaught TypeError: Cannot read property 'addEventListener' of null". As far as I know, chrome support the "addEventListener" function, but it can't identify the function. Here is my code.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;event test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;script type="text/javascript"&gt;
      var EventUtil = {
          addHandler : function(element, type, handler){
              if (element.addEventListener){
                  element.addEventListener(type,handler,false);
              }else if (element.attachEvent){
                  element.attachEvent("on" + type,handler);
              }else{
                  element["on" + type] = handler;
              }
          },
          removeHandler : function(element, type, handler){
              if (element.removeEventListener){
                  element.removeEventListener(type,handler,false);
              }else if (element.detachEvent){
                  element.detachEvent("on" + type,handler);
              }else{
                  element["on" + type] = null;
              }
          }
      };
      var btn = document.getElementById('myBtn');
      var handler1 = function(){
          alert("Hello!");
      };
      EventUtil.addHandler(btn,"click",handler1);
  &lt;/script&gt;
  &lt;input type="button" name="mybutton" id="myBtn" value="myButton"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>What's wrong with the code? How to fix it?</p>