<div class="codetitle"> <span><a style="CURSOR: pointer" data="2061" class="copybut" id="copybut2061" onclick="doCopy('code2061')"><u>复制代</u></a></span> 代码如下:</div> <div class="codebody" id="code2061"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <BR><html xmlns="http://www.w3.org/1999/xhtml"> <br> <br><title></title> <br><style type="text/css"> <br>#img1 <br>{ <br>幅: 500px; <br>高さ: 400ピクセル; <br>ボーダー: 実線 1px #ccc; <br>表示:なし; <br>} <br></style> <br><script src="jquery-1.9.1.js" type="text/javascript"></script> <br><script type="text/javascript"> <br>$(document).ready(function () { <br>$('#Button1').click(function () { <br>$('#img1').show(5000); <br> }); <br>$('#Button2').click(function () { <br>$('#img1').hide(5000); <br>}) <br>$('#Button3' ).click(function () { <br>$('#img1').fadeIn(2000); <br>}) <br>$('#Button4').click(function () { <br>$ ('#img1').fadeOut(1000); <br>}) <br>}) <br></script> <br></head> <br> <br><img id="img1" src="images/1.jpg" /> <br><input id="Button1" type="button" value="展开图片" /> <br><input id="Button2" type="button" value="收缩图片" /> <br><input id="Button3" type="button" value="图片" /> <br><input id="Button4" type="button" value="图片1" /> <br></body> <br></html> <br> </div>