jquery实现点击隐藏,再点击原按钮恢复
<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").toggle();
});
});
</script>
</head>
<body>
<p id="p1"> if you click on me ,i will disappear.</p>
<button type="button" id="hide">hide</button>
</body>
</html>
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。