Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7484 댓글 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] Touch ID 적용 샘플 코드 (예제)
-
[ios] UDID 사용 제한에 따른 대안들
-
[ios] UDID와 UUID (디바이스의 Unique Identifier)
-
[ios] UIAlertView 초간단 샘플 ㅎㅎ
-
[ios] UIButton multi-line iOS7
-
[ios] UIColor 지정에서 RGB define ㅎㅎ
-
[ios] UILabel top alignㅎㅎ
-
[ios] UITableView 특정 Row만 Update
-
[ios] UIView에서 상위 UIViewController 가져오기
-
[ios] UIWebView 캐쉬 삭제
-
[ios] UIWebView 쿠키 유지
-
[ios] UIWebView를 이용한 로컬 HTML 파일 표시