<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> New Document </title>
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
  <script type="text/javascript" src="js/jquery-1.8.3.js">
  </script>
  <script type="text/javascript">
 jQuery(document).ready(
  function(){
   $("#i").bind("click",function(){
    alert('jquery绑定 1!');
   
   }); 
   $("#i").bind("click",function(){
    alert('jquery绑定 2!');
   
   }); 
   
   var handler = function(){
    alert("js绑定!")
   
   };
   
   document.getElementById("i").attachEvent(" ;
   //document.getElementById("i").addEventListener("click",handler)  ;//这里绑定用click(firefox)
   
   $("#i").unbind("click");
   
   //document.getElementById("i").detachEvent("onclick",handler);//而这里绑定用onclick (IE)
   
  }
 );
  </script>
 </head>
 <body>
 <input type="button" value="点击我" id="i"/>
 </body>
</html>

要注意 : 事件的绑定和取消成对出现,比如 bind 对应unbind ,而attachEvent对应detachEvent

unbind是无法取消attachEvent绑定的东西的。

另外js绑定与jquery绑定触发执行顺序与不同浏览器有关