<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> type type text/css"><br> .imgclass{ width:300px;高度:300px; border:solid 1px red;}<br> <br> ="text/javascript"><br> <br> <br> $ '點擊', function () {<br> $('img') .slideUp(2000);<br> $('#Button2').bind('click', function () {<br> $('img').slideDown(2000);<br> })<br> $('#button3')。 。 <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>