AI智能
改变未来

jQuery – toggle() 切换 显示与隐藏

<html>
<head>
<script type=\”text/javascript\” src=\”/jquery/jquery.js\”></script>
<script type=\”text/javascript\”>
$(document).ready(function(){
  $(\”.btn1\”).click(function(){
  $(\”p\”).toggle();
  });
});
</script>
</head>
<body>
<p>This is a paragraph.</p>
<button class=\”btn1\”>Toggle</button>
</body>
</html>

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » jQuery – toggle() 切换 显示与隐藏