Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7476 댓글 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++] 초간단 스택 두 가지 방식(class, struct)
-
HTTPS와 SSL 인증서
-
[c] IP 스푸핑(ip spoof) 소스 - 정리해야 함
-
[chm] 윈도우즈에서 디버깅 기법(Debugging Applications)
-
[php] 웹 응용프로그램(engines) 모음
-
[chm] 비주얼 C++ 팁 모음 문서
-
[php] 데이터를 엑셀,워드 형태로 변환할 때 헤더(ms-office)
-
[c] 시어핀스키 가스킷..(p.582, A.2 - 두번째)
-
[js] 이미지 사이즈를 동적으로 조절..
-
[c] 더블(이중) 연결리스트 예제..
-
[c] 간단한 순위 루틴.. (질문에 대한 답변)
-
[c] 파일(File) 관련 함수 샘플 코드