<div class="codetitle"> <span><a style="CURSOR: pointer" data="15874" class="copybut" id="copybut15874" onclick="doCopy('code15874')"><u>複製代碼</u></a></span>如下代碼:</div> <div class="codebody" id="code15874"> <br> 渡//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br><br><br> <title></title> <br> <style type="text/css"><BR> img<BR> {<BR> img<BR> {<BR> img<BR> {<BR> img<0p <BR> }<BR> </style> <br> <script src="jquery-1.9.1.js" type="text/javascript"></script><br> <javascript type="text/jsscript"><br> <javascript type="text/ "><br> $(function () {<br> $('#btn1').click(function ath.random() * 8 1);<br> $('img').attr('src','picture/' num '.jpg')<br> <br><br><br><img src="picture/1.jpg" id="img1" alt="jQuery隨機切換圖片的小例子_jquery" ><br><input id="btn1" type="button" value="transform"><br> </javascript></javascript> </div>