继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

jquery实现点击隐藏,点击显示

慕娘5729972
关注TA
已关注
手记 240
粉丝 133
获赞 771

<html>
<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs
/jquery/1.4.0/jquery.min.js"></script>
</head>

</script>
<script type="text/javascript">
$(document).ready(function(){
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
});
</script>
</head>
<body>
<p id="p1"> if you click on me ,i will disappear.</p>
<button type="button" id="hide">hide</button>
<button type="button" id="show">show</button>
</body>
</html>

打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP