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>
-
[php] Connect to Firebase Console in Laravel
-
[php] 3 Ways to Detect Mobile or Desktop in PHP
-
[pdf] 포인터 문법 정리 (C pointer)
-
[pdf] 윈도우즈 95 시스템 프로그래밍(Windows 95 system programming)
-
[pdf] GPS의 동작 원리 ㅎㅎ
-
[pdf] C++ 국제 표준 문서
-
[pdf] C 국제 표준 문서
-
[opengl] 컴퓨터 그래픽스 강의 자료(수업자료)
-
[node.js] 지금 하고 있는거..
-
[node.js] nodejs 기본 설치
-
[mysql] 양력, 음력 DB데이터
-
[maven] Mac OS에 메이븐(maven) 설치하기