<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>hover的用法</title>
<script src="Scripts/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#p1").hover(function () { $(this).text("来了") }, function () { $(this).text("慢走") });
})
</script>
</head>
<body>
<p id="p1">一是一个段落</p>
</body>
</html>
jquery hover的使用方法(替代mouseenter()鼠标移进 和mouseleave()鼠标移出)
最新推荐文章于 2024-01-29 16:43:03 发布