jQuery – 8.事件和事件参数
事件 (*)JQuery中的事件绑定:$(“#btn”).bind(“click”,function(){}),每次都这么调用太麻烦,所以jQuery可以用$(“#btn”).click(function(){})来进行简化。unbind <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script src="Jqeury/jquery-1.10.2.js"></script> <script type="text/javascript"> $(function () { $("input[value='bind']").click(function() { $("#btn").bind( { "click": function() { alert("click"); }, "mouseover": function() { alert("mouseover"); }, "mouseout": function() { alert("mouseout"); } } ); }); $("input[value='unbind']"