我在jquery中写了非常小的代码,但我无法执行它我在哪里错了?为什么这个jQuery代码不适合我?
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js">
<script type="text/javascript">
$(document).ready(function(){
$("p").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
</body>
</html>
任何帮助将大大appriciated。
检查您的JavaScript控制台。看看是否有任何错误。 –