채택완료
input 창 length가 0이 돼면 체크박스를 해제하고 싶습니다.
<?php if ($is_email) { ?>
<span class="emailArea">
<div class="subject">이메일</div>
<label for="wr_email" class="sound_only">이메일</label>
<input onKeyPress="emailAni()" tabindex="4" style="width:132px;" tabindex="4" type="text" name="wr_email" value="<?php echo $email ?>" id="wr_email" class="allInput half_input email" placeholder="이메일" alt="이메일" title="이메일">
</span>
<?php } ?>
if($('input:text[name="wr_email"]').length == 0){
$('input:checkbox[name="mail"]').prop('checked',false);
}
뭐가 틀린거죠?
|
답변 4개
채택된 답변
+20 포인트
답변을 작성하려면 로그인이 필요합니다.