Develop
2013.04.23 16:12
[js] 이미지 사이즈를 동적으로 조절..
조회 수 7476 댓글 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>
-
[mysql] mysql user 생성시 ERROR 1364
-
맥에서 파일공유 (윈도우,맥)
-
[js]모바일 웹에서 orientationchange
-
[android] keytool을 사용하여 키스토어 생성
-
[js] 모바일웹에서 이미지 저장하는거 (context menu) 막기
-
[js] JSON 컨트롤.. 재귀호출로 값 출력하기
-
[iphone] 파일 업로드 샘플 코드 ㅎㅎ
-
[node.js] 지금 하고 있는거..
-
[node.js] nodejs 기본 설치
-
[iphone] 화면 전환 Portrait & Landscape Mode
-
[iphone] performSelector:withObject:afterDelay: 에 대한 내용
-
[ios] 디렉토리 하하하..