语法:$(selector).toggle(speed,callback,switch)
实例:
<script src="js/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("input").click(function () {
$("img").toggle(1000);//逐渐隐藏
}
);
});
</script>
<body>
<input type="button" value="HideOrShow" />
<p> <img src="images/1.jpg"/></p>
</body>
原文地址:https://www.cnblogs.com/weimingxin/p/9018048.html
时间: 2024-11-09 04:38:25