下述代码实现,多个事件绑定不同函数:

$(document).ready(function(){
$("p").on({
mouseover:function(){$("body").css("background-color","lightgray");},
mouseout:function(){$("body").css("background-color","lightblue");},
click:function(){$("body").css("background-color","yellow");}
});
});


与《jQuery多个事件绑定不同函数》相关的博文:

留言