<img src="xxx.jpg" onclick=how_size(this) title=이미지크기는얼마일까요 style=cursor:pointer>
<script language=javascript>
function get_image_size(id) {
img = document.body.appendChild(document.createElement('img'))
img.src = id.src;
var w = img.offsetWidth;
var h = img.offsetHeight;
document.body.removeChild(img);
return {width:w,height:h};
}
function how_size(img) {
var size = get_image_size(img);
alert('width:'+size.width+',height:'+size.height);
}
</script>
영삼넷
Categories
Recent Posts
Recent Comments
Statistics
- Total Visitors:
- 424576
- Today:
- 6845568
- Yesterday:
- 9758188
IT강국 김영삼 블로그에 오신걸 진심으로 환영합니다.
©2002 영삼넷 // openkr
©2002 영삼넷 // openkr