您现在的位置是:首页> 网站开发> CSS
jquery鼠标移上与移出事件
- 5107人已阅读
- 时间:2020-03-02 22:36:48
- 分类:CSS
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").mouseover(function(){
$("p").css("background-color","yellow");
});
$("p").mouseout(function(){
$("p").css("background-color","#E9E9E4");
});
});
</script>
</head>
<body>
<p style="background-color:#E9E9E4">请把鼠标指针移动到这个段落上。</p>
</body>
</html>上一篇:css使鼠标移到div上显示手型
下一篇:\n,\r\n,\r换行说明