W3School TIY
编辑您的代码:
<!DOCTYPE html> <html> <head> <script src="../jquery/jquery-1.11.1.min.js" > </script> <script> $(document).ready(function(){ $("p").click(function(){ $(this).hide(); }); }); </script> </head> <body> <p>如果您点击我,我会消失。</p> <p>点击我,我会消失。</p> <p>也要点击我哦。</p> </body> </html>
查看结果: