Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
Views 7519 Comment 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>
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
597 | Develop | [c] 문자열 정렬 함수 qsort() | hooni | 2003.04.23 | 8281 |
596 | Develop | [c] selec()를 이용한 입출력 다중화 | hooni | 2013.04.23 | 8285 |
595 | Develop | [php] 마시마로 캐릭터 방명록 | hooni | 2003.04.23 | 8288 |
594 | Develop | [c++] 현승이가 준 메신저 소스.. ㅋㅋ | hooni | 2013.04.23 | 8310 |
593 | Develop | [c++] 레지스트리 편집하는 부분..ㅡㅡ; | hooni | 2013.04.23 | 8316 |
592 | Develop | [c] 이진트리(binary tree)의 운행.. | hooni | 2003.04.23 | 8345 |
591 | Develop | [js] selectbox 선택 후 input 박스에 적용 | hooni | 2013.04.23 | 8356 |
590 | Develop | [c] 암호 알고리즘 소스.. | hooni | 2013.04.23 | 8360 |
589 | Develop | [c] 콘솔에서 패스워드 입력시 문자 보이지 않게 하는 코드 | hooni | 2013.04.23 | 8368 |
588 | Develop | [js] 쿠키(cookie)에 대한 설명과 예제.. | hooni | 2003.04.23 | 8373 |
587 | Develop | [java] 채팅 프로그램.. swing 사용.. | hooni | 2013.04.23 | 8380 |
586 | Develop | [c] 구조체의 설명과 예제.. | hooni | 2003.04.23 | 8415 |