Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7519 댓글 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>
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
445 | Develop | [c++] 현승이가 준 P2P 프로그램 소스 ㅋㅋ | hooni | 2013.04.23 | 12115 |
444 | Develop | [c++] BHO 프로그램 동작 원리.. 간단하게.. | hooni | 2013.04.23 | 43173 |
443 | Develop | OPT와 CAS에 대한 자료.. (교수님 메일로 보내드린 자료..) | hooni | 2013.04.23 | 13991 |
442 | Develop | [doc] 테크니컬 레포트 (BHO 취약점을 이용한 공격) 2 | hooni | 2013.04.23 | 27164 |
441 | Develop | [doc] 유료 방송 제어 시스템 (CAS) 발표자료 | hooni | 2013.04.23 | 8547 |
440 | Develop | [c++] 웹폼(webform)전송과 http 파일 업로드 샘플 | hooni | 2013.04.23 | 33130 |
439 | Develop | [c++] 디렉토리 내의 파일 찾기 FindFirstFile() 함수 6 | hooni | 2013.04.23 | 20701 |
438 | Develop | [c++] 가짜 인증서(하나은행) 프로그램 | hooni | 2013.04.23 | 10799 |
» | Develop | [js] 이미지 사이즈를 동적으로 조절.. | hooni | 2013.04.23 | 7519 |
436 | Develop | [js] 부모창에서 자식창으로 문자열 전달.. | hooni | 2013.04.23 | 7497 |
435 | Develop | [c#] 툴바 소스.. 개인적으로 만드는거.. | hooni | 2013.04.23 | 3304 |
434 | Develop | [php] 그래프 그리는 프로그램.. | hooni | 2013.04.23 | 8525 |