<html>
<head>
<script type="text/javascript">
function resize(image)
{
var differenceHeight = document.body.clientHeight - image.clientHeight;
var differenceWidth = document.body.clientWidth - image.clientWidth;
if (differenceHeight < 0) differenceHeight = differenceHeight * -1;
if (differenceWidth < 0) differenceWidth = differenceWidth * -1;
if (differenceHeight > differenceWidth)
{
image.style['height'] = document.body.clientHeight + 'px';
}
else
{
image.style['width'] = document.body.clientWidth + 'px';
}
// Optional: remove margins or compensate for offset.
image.style['margin'] = 0;
document.body.style['margin'] = 0;
}
</script>
</head>
<body>
<img src="http://extremecnc.co.kr/board_data/z_product/1297766177_98262_8.jpg" onload="resize(this);" />
</body>
</html>
'Android > Tip&Tech' 카테고리의 다른 글
스피너 외관확장관련 링크모음 (0) | 2011.03.23 |
---|---|
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE) (0) | 2011.03.22 |
안드로이드 팁 모음 (0) | 2011.03.22 |
안드로이드 외부 이미지 사용하기(ListView,WebView) (0) | 2011.03.22 |
Bitmap Image Resize Tip (0) | 2011.03.22 |