jQuery中的ev对象

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<script src="jquery-1.10.1.min.js"></script>
<script>



$(function(){

$('#div1').on('click',{name:'hello'},function(ev){

alert(ev.data.name); // 传递参数

alert( ev.target ); // 当前操作的事件源

alert( ev.type ); // 当前操作的事件类型

});


});

</script>
</head>

<body>
<div id="div1">aaaa</div>
</body>
</html>
author:Lik
Endeavoring to powerless, struggling to move yourself.
原文地址:https://www.cnblogs.com/likwin/p/7096993.html