先给出html””部分内容
<body>
<p>haha 1
</p>
<p>haha 2
</p>
<p>haha 3
</p>
<p>haha 4
</p>
</body>
click函数:单击”
”标签的内容,弹出弹窗,显示”
”标签的内容
$(
function(){
$(
"p").click(
function(){
alter($(
this).html());
})
})
hover函数:悬停,xxxxxxx
$(
function(){
$(
"p").hover(
function(){
alter($(
this).html());
})
})
还有mousedown、mouseenter、mouseleave、mousemove、mouseout(支持事件冒泡)、mouseover(支持事件冒泡)、mouseup
转载请注明原文地址: https://www.6miu.com/read-80590.html