<div class="codetitle"> <span><a style="CURSOR: pointer" data="40" class="copybut" id="copybut40" onclick="doCopy('code40')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code40"> <br> <title></title> <br> <style type="text/css"><BR> .imgclass{ width:300px; height:300px; border:solid 1px red;}<BR> </style> <br> <script src="jquery-1.9.1.js" type="text/javascript"></script><br> <script type="text/javascript"><BR> $(function () {<BR> $('#Button1').bind('click', function () {<BR> $('img').slideUp(2000);<BR> })<BR> $('#Button2').bind('click', function () {<BR> $('img').slideDown(2000);<BR> })<BR> $('#Button3').bind('click', function () {<BR> $('img').slideToggle(2000);<BR> })<BR> })<BR> </script><br><br><br><div> <br><div> <br> <input id="Button1" type="button" value="上拉"><input id="Button2" type="button" value="下拉"><input id="Button3" type="button" value="自动上拉下拉"> </div> <br> <div><img src="images/1.jpg" class="imgclass" alt="jQuery的slideToggle方法实例_jquery" ></div> <br> </div> <br><br> </div>