bind方法为每个匹配元素的特定事件绑定事件处理函数。
描述:
当每个段落被点击的时候,弹出其文本。
jQuery 代码:
$("p").bind("click", function(){ alert( $(this).text() );});
同时绑定多个事件类型
$('#foo').bind('mouseenter mouseleave', function() { $(this).toggleClass('entered');});
150 2119 3649 电话、微信同号
在线客服QQ350934628
10年行业经验,服务网络覆盖全国
350934628@qq.com咨询建议投诉