好的,这是我的代码,它可以工作,但只有 1 个循环。我错过了什么让事件一遍又一遍地循环
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
$("button").click(function(){
$("p").show();
});
});
});
</script>
</head>
<body>
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
<button> click </button>
</body>
</html>