<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
p{ width:150px; height:150px; float:left; border:1px solid #ddd; }
</style>
</head>
<body>
<div id="append"> <p>amaze</p> <p>amaze</p> <p>amaze</p> <p>amaze</p> </div> <script type="text/javascript" src="jquery-3.1.1.min.js"></script> <script type="text/javascript"> $("#append").on("mouseenter mouseleave","p",function(e){ if(e.type == "mouseenter"){ //鼠标进入 $(this).text("wow"); }else if(e.type == "mouseleave"){ //鼠标离开 $(this).text("amaze"); } }); </script>
</body>
</html>
settimeout(functoin(){},3000)
一周热门 更多>