이미지 사이즈 조절방법
<script language="JavaScript" type="text/JavaScript">
// 부모페이지에서 호출한 테이블 width를 구함
var max_width = parent.document.all.tbs.width;
function fn_on_load(){
var new_height;
for ( now_width=0, cnt_length=document.images.length ; now_width < cnt_length ; now_width++ )
{
if ( document.images[now_width].width > max_width )
{
new_height = document.images[now_width].height * max_width / document.images[now_width].width;
document.images[now_width].width = max_width;
document.images[now_width].height = new_height;
}
}
}
</script>
<body style="background-color:transparent" onload="fn_on_load();" >
<table width=400>
<tr>
<td>
<img src="./data/Vodka Sunrise.jpg"><br>
<img src="./data/Dura.jpg"><br><br>
<table width=800 border=3>
<tr><td>800</td></tr>
</table>
</td>
</tr>
</table>
<br><br><br><hr><br><br>
</body>