프로그래밍/제이쿼리 썸네일형 리스트형 파일 선택시 검증하기 파일업로드시 자바스크립트로 파일 선택되면 파일 사이즈 및 확장자 체크 하기 jQuery(function($) { $('#img_file').bind('change', function () {// 1메가 1,048,576var img_limit = 1048576; //this.files[0].size gets the size of your file. //alert(this.files[0].size); var file = $("#img_file").val(); // 폼.파일이름.value var fileExt = file.substring(file.lastIndexOf('.')+1); //파일의 확장자를 구합니다. if(this.files[0].size > img_limit){alert("이미지 용량은 1메.. 더보기 제이쿼리 readonly 컨트롤하기 더보기 제이쿼리 화면 스크롤 사용하기 제이쿼리로 화면 스크롤 내렸다 올렸다 적용하기. $( 'html, body' ).stop().animate( { scrollTop : '-=550' }, 100 ); // 화면 위로 스크롤 하기, 뒤에 100은 속도. $( 'html, body' ).stop().animate( { scrollTop : '+=550' }, 100 ); // 화면 아래로 스크롤 하기, 0은 빠르고 //숫자가 커질수록 느려짐. 화면 스크롤 속도. $(document).ready(function(){ $("#insert_btn1").click(function(){ $( 'html, body' ).stop().animate( { scrollTop : '+=550' }, 100 ); }); }); 더보기 이전 1 ··· 3 4 5 6 7 8 9 ··· 12 다음