«image-size» 태그된 질문

8
자바 스크립트로 업로드하기 전에 이미지 너비와 높이를 확인하세요.
사용자가 이미지를 넣을 수있는 양식이있는 JPS가 있습니다. <div class="photo"> <div>Photo (max 240x240 and 100 kb):</div> <input type="file" name="photo" id="photoInput" onchange="checkPhoto(this)"/> </div> 이 js를 작성했습니다. function checkPhoto(target) { if(target.files[0].type.indexOf("image") == -1) { document.getElementById("photoLabel").innerHTML = "File not supported"; return false; } if(target.files[0].size > 102400) { document.getElementById("photoLabel").innerHTML = "Image too big (max 100kb)"; …

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.