Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7500 댓글 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>
-
[ios] URL Scheme 이용하여 앱 설치 확인
-
[ios] URL 랜딩 속도(OpenURL 10초 정지되는) 이슈
-
[ios] URL 파라미터 파싱~
-
[ios] Using protobuf(Protocol Buffers) on iPhone (iOS)
-
[ios] UUID 생성 + Key Chain 연동
-
[ios] ViewController Push할 때 애니메이션 효과
-
[ios] VIN Scanner (VIN barcode) 스캐너
-
[ios] WWDC 2015 샘플 소스 코드 통합파일
-
[ios] Xcode cannot run using the selected device
-
[iOS] Xcode 불필요한 캐시 삭제하기
-
[ios] Xcode를 사용해서 Static Library 만들기 (시뮬레이터 + 디바이스)
-
[ios] XCode에서 Provisioning Profile 여러개 중복될 때