<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>jq之demo</title><!--线上jq库--><script src="https://code.jquery.com/jquery-3.4.1.min.js"></script><script>$(document).ready(function(){$("button").click(function(){/*chaining方法链接*/$("#p1").css("color","red").slideUp(2000).slideDown(2000);});});</script>
</head>
<body>
<p id="p1">w3c</p>
<button>点我</button>
</body>
</html>