<style> .demo{ cursor:pointer; } </style> </head> <body> <p class="demo">点击我</p> <script> $(".demo").click(function(){ alert("jQuery demo!"); }); </script>