제이쿼리 업로드 질문이요

제이쿼리 업로드 질문이요

QA

제이쿼리 업로드 질문이요

본문

우선적으로 밑에 똑같은 소스가 5개정도가 있어요 [예시로 하나정도를..]

거기서 업로드 버튼을 클릭하면 클릭한 한줄에서 업로드가 비워있으면 비워있다고 알림창 뜨거든요

근데 파일을 업로드하고나서 업로드버튼을 누르니까 계속 알림창이 뜨네요.. 뭐가 문제일까요... 조건문 다음으로 넘어가지 않아요

 

 

<tr class="imgbox" data-num="1">
                        <td class="bl cnt">이미지</td>
                        <td>
                            <input type="hidden" name="img_alt[]" value="이미지1">
                            <i class="fa fa-download"></i><input type="file" name="bf_file[]" accept="image/*" class="bffile frm_file">
                            <button type="button" class="btnUpload btn_submit btn">업로드</button>
                                                    </td>
                    </tr>

.....

 

 

$('.btnUpload').on('click', function () {
    var trlength = $(this).closest('.imgbox').data('num');
    if($(!$.trim($(this).closest('.imgbox').find("input[type='file']").val()))) {
        alert("파일을 업로드해주세요. #"+trlength);
        $(this).closest('.imgbox').find('.bffile').focus();
        return false;
    }else {

       }

});

이 질문에 댓글 쓰기 :

답변을 작성하시기 전에 로그인 해주세요.
전체 123,119 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT