Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7527 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
541 | Develop | [ios] DJBros. (DJ요맨~) | hooni | 2013.04.23 | 28228 |
540 | Develop | [ios] Debug Extensions (from 종길 차장님 ㅋㅋ) | hooni | 2013.04.23 | 17785 |
539 | Develop | [ios] 아이폰 개발 총정리.. | hooni | 2013.04.23 | 23995 |
538 | Develop | [ios] 구분자로 문자열 자르기 (split) | hooni | 2013.04.23 | 26394 |
537 | Develop | [iphone] view에 대한 조사 ㅡ,.ㅡ; | hooni | 2013.04.23 | 54227 |
536 | Develop | [ios] NSMutableString 문자열 패턴 교환 | hooni | 2013.04.23 | 29122 |
535 | Develop | 논문 실험용 고려대 툴바 ㅎㅎ | hooni | 2013.04.23 | 8686 |
534 | Develop | [ios] 개발 기초 가이드 링크.. | hooni | 2013.04.23 | 31526 |
533 | Develop | 웹페이지 성능 테스트 툴 설명 | hooni | 2013.04.23 | 27741 |
532 | Develop | [Xcode] 디버깅 옵션 | hooni | 2013.04.23 | 57444 |
531 | Develop | [ios] Objective-C 문자열 잘라서 배열(NSArray)에 넣기 | hooni | 2013.04.23 | 29554 |
530 | Develop | [ios] Objective-C 특정 문자 찾아 제거하기 | hooni | 2013.04.23 | 28208 |