$(document).ready(function(){
$(".uploadfile").on("change",function(){
var objId = $(this).attr("id");
var target = $(this).next();
var val = $(this).val();
var thisDom = $(this)[0];
if (thisDom.files && thisDom.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$(target).css("max-width","100%");
$(target).attr('src', e.target.result);
}
}else{
}
reader.readAsDataURL(thisDom.files[0]);
return false;
});
});
ready 함수에 이벤트 등록
<input class="uploadfile" type="file" name="mb_biz_img_path">
<img style="max-width:100%;" src="${sessionScope.rb_member.MB_BIZ_IMG_PATH}" alt="이미지가 없습니다." class="uploadImage"/>
밑에 uploadImage 클래스 img 태그를 추가
끝
피드 구독하기:
댓글 (Atom)
[lunux]리눅스 폴더별 용량 확인
리눅스 폴더별 용량 확인 조회 하고자 하는 디렉토리 리스트가있는 경로로 이동후 du -h --max-depth=1
-
pom.xml <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId&g...
-
수십대의 서버에 특정 쉘을 실행한다거나 파일을 수정해야할경우 호스트 입력 아이디 입력 패스워드 입력은 여간 짜증나는일이 아닐수 없다. 이를 한방에 해주는 방법 teraterm 를 설치한다( putty 는 버리자 ) 예를 들면 19...
-
다른 페이지로 이동 해서 프로세스 실행후 다시 이전 페이지로 돌아와야할경우 page url 을 파라미터로 넘겨야 하는데 location.protocol : 프로토콜 예) https: location.host : 도메인 예) naver.com l...
댓글 없음:
댓글 쓰기