Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7523 댓글 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>
-
[doc] 유료 방송 제어 시스템 (CAS) 발표자료
-
[c++] 웹폼(webform)전송과 http 파일 업로드 샘플
-
[c++] 디렉토리 내의 파일 찾기 FindFirstFile() 함수
-
[c++] 가짜 인증서(하나은행) 프로그램
-
[js] 이미지 사이즈를 동적으로 조절..
-
[js] 부모창에서 자식창으로 문자열 전달..
-
[c#] 툴바 소스.. 개인적으로 만드는거..
-
[php] 그래프 그리는 프로그램..
-
[js] 네이버에서 그림 퍼올 때.. URL Encoding 관련ㅋㅋ
-
[linux] 날짜나 파일의 내용으로 검색하는 방법(find 명령 사용)
-
[c++] 현승이가 준 메신저 소스.. ㅋㅋ
-
[c] 아파치 모듈(Apache Module) 만들기