Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7505 댓글 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>
-
[c] 단기과정[01/07] 제어문, 피보나치수열
-
[c] 지폰(gphone) 소스.. 수정(암호화)
-
[c] 암호화 알고리즘 DES 구현 ㅋㅋ
-
[ios][swift] 초간단 카달로그 앱 (Catalog App)
-
[php] gd 프로그램.. htm 파일.. ㅋㅋ
-
[c++] MFC 모든 헤더와 라이브러리 설명 | [교류]Programming
-
[jsp] 유효성체크(Client, Server 에서)
-
[js] 부모창에서 자식창으로 문자열 전달..
-
[c] 더블(이중) 연결리스트 예제..
-
[c] 파일(File) 관련 함수 샘플 코드
-
[c] 격자 직사각형 넓이 구하기
-
[c] 간단한 순위 루틴.. (질문에 대한 답변)