画像のサイズを変更する MENU


Source

    <HTML lang="ja"> <HEAD> <TITLE>画像のサイズを変更する</TITLE> <STYLE TYPE="text/css"> <!-- button.button { color: #ffffff; background-color: #0000ff; font-size: 18px; width: 70px; border: 1px solid #ffffff; cursor: pointer; } button.button:hover { background-color: #ff00ff; } //--> </STYLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function disp(n) { if(document.getElementById) { document.getElementById('img1').width = 96*n; document.getElementById('img1').height = 96*n; } else { if(document.all) { document.all('img1').width = 96*n; document.all('img1').height = 96*n; } } } //--> </SCRIPT> </head> <BODY bgColor=#eeeedd text="#000000"> <FORM NAME="form1"> <button TYPE="button" onClick="disp(1)" class="button">普通</button> <button TYPE="button" onClick="disp(2)" class="button">拡大</button> </FORM> <IMG SRC="G1.gif" ID="img1" width="96" height="93"> </body> </html>