write에서 agree 체크하기

write에서 agree 체크하기

QA

write에서 agree 체크하기

본문

write에서 agree가 checked됐는지 안됏는지..

 


<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>" onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data" autocomplete="off" >
생략
<input type="checkbox" class="css-checkbox lrg" name="agree"  id="agree" /><label for="agree" class="css-label lrg klaus">개인정보 수집 및 이용에 대해 동의합니다.</label>
 
생략
</form>
<script>
function fwrite_submit(f)
{
    if (!f.agree.checked=="") {
        alert("약관 내용에 동의해주세요.");
        f.agree.focus();
        return false;
    }
}
</script>

 

로 했는데 안되는데 ...

왜그럴까요 ㅠ

 

이 질문에 댓글 쓰기 :

답변 3

아래와 같이 해주세요.

if (f.agree.checked==false) {

...

}

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

회원로그인

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