菜单切换
htmlbook实例代码
htmlbook在线教程
htmlbook站长工具
赞赏工具
源代码
(
显示异常
)
:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://cdn.staticfile.org/jquery/1.10.2/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>htmlbook在线</h3> <div class="ex"> <button class="hide">点我隐藏</button> <p>站点名: htmlbook在线<br> 站点 URL:http://www.htmlbook.com.cn</p> </div> </body> </html>
运行结果