JAVA Script 이미지 파일 업로드시 미리보기 catch the sky 2017. 11. 15. 16:29 반응형 <script> function imageView(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function(e) { $('#tempImage').attr('src', e.target.result) .width(100) .height(100); } reader.readAsDataURL(input.files[0]); } } </script> <input type="file" class="file" onchange="imageView(this)" /> <div style="width:100px; height:100px;"><img id="tempImage" src=""></a></div> 반응형 저작자표시 비영리 변경금지 (새창열림)