JQuery 连接
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <p id="p1">this is p</p> <button id="btn1" type="button">click</button> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="JQ_chaining.js"> /** * 在相同的元素中运行多条语句 */ $(document).ready(function(){ $("#btn1").click(function(){ $("#p1").css("color","red").slideUp("slow"); }) }) </script> </body> </html>