下列通过两个按钮实现显示隐藏
html+jquery
<p>hello</p>
<button id="hide">隐藏</button>
<button id="show">显示</button>
<script src="/static/js/jquery-3.6.0.min.js"></script>
<script>
$(function(){
$("#hide").click(function(){
$("p").hide(1000);
});
$("#show").click(function(){
$("p").show(1000);
});
});
</script>