fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"> </script> <script> $(document).ready(function(){ $(".ex .hide").click(function(){ $(this).parents(".ex").hide("slow"); }); }); </script> <style type="text/css"> div.ex { background-color:#e5eecc; padding:7px; border:solid 1px #c3c3c3; } </style> </head> <body> <h3>Google</h3> <div class="ex"> <button class="hide">点我隐藏</button> <p>站点名: Google<br> 站点 URL:http://www.google.com</p> </div> <h3>Fmpq教程</h3> <div class="ex"> <button class="hide">点我隐藏</button> <p>站点名: Fmpq教程<br> 站点 URL:http://www.fmpq.com</p> </div> </body> </html>
运行结果