0
点赞
收藏
分享

微信扫一扫

jQuery 效果 - 隐藏和显示

慕容冲_a4b8 2022-05-16 阅读 44

jQuery 效果 - 隐藏和显示_ide

<!DOCTYPE html>

<html>

<head>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){

$("#hide").click(function(){

$("p").hide();

});

$("#show").click(function(){

$("p").show();

});

});

</script>

</head>

<body>

<p id="p1">如果点击“隐藏”按钮,我就会消失。</p>

<button id="hide" type="button">隐藏</button>

<button id="show" type="button">显示</button>

</body>

</html>


举报

相关推荐

0 条评论