Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7486 댓글 0
IMG 태그 안에 삽입하여 해당 이미지 사이즈를 동적으로 조정
<html> <head> <title>image resize</title> <style> body,table,tr,td {font-size:9pt;} </style> <script> function img_resize(img){ var mywidth = 200; if( img.width > mywidth ){ r = mywidth / img.width; w = img.width * r; h = img.height * r; img.width = w; img.height = h; } } </script> </head> <body> <table border=0 cellpadding=0 cellspacing=0> <tr> <td><img src="test.jpg" border=0 onLoad="img_resize(this);"></td> </tr> </table> </body> </html>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
585 | Develop | [js] 쿠키(cookie)에 대한 설명과 예제.. | hooni | 2003.04.23 | 8344 |
584 | Develop | [js] selectbox 선택 후 input 박스에 적용 | hooni | 2013.04.23 | 8340 |
583 | Develop |
[swift] NotificationCenter 간단 예제
![]() |
hooni | 2021.01.27 | 8314 |
582 | Develop |
[c++] 현승이가 준 메신저 소스.. ㅋㅋ
![]() |
hooni | 2013.04.23 | 8291 |
581 | Develop |
[c++] 레지스트리 편집하는 부분..ㅡㅡ;
![]() |
hooni | 2013.04.23 | 8289 |
580 | Develop | [c] 이진트리(binary tree)의 운행.. | hooni | 2003.04.23 | 8287 |
579 | Develop |
[c] selec()를 이용한 입출력 다중화
![]() |
hooni | 2013.04.23 | 8269 |
578 | Develop |
[php] 마시마로 캐릭터 방명록
![]() |
hooni | 2003.04.23 | 8265 |
577 | Develop | [unix] Java 애플릿용 HTML 자동 생성 | hooni | 2014.02.19 | 8261 |
576 | Develop | [c] 문자열 정렬 함수 qsort() | hooni | 2003.04.23 | 8261 |
575 | Develop |
[c] 그래픽 차트 라이브러리.. 나중에 확인 해볼 거..
![]() |
hooni | 2013.04.23 | 8235 |
574 | Develop |
[vb] 64bit RSA 프로그램 소스 ㅋㅋ
![]() |
hooni | 2013.04.23 | 8222 |