<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>toggle2</title>
<script type="text/javascript" src="class library/jquery-1.10.2.min.js"></script>
<script>
$(document).ready(function(){
$('input').click(function(){
$('p').toggle('slow');
});
});
</script>
</head>
<body>
<input type="button" value="切换">
<p>这里本来是显示的</p>
<p style="display:none; color:red;">这里本来是隐藏的</p>
</body>
</html>
toggle2
最新推荐文章于 2024-04-03 10:16:06 发布