체크박스 필수입력 받으려면... 정보
체크박스 필수입력 받으려면...본문
아래와 같은 방식으로 체크박스가 있는 설문이 여러개 있는데
각 항목별로 한개라도 필수로 체크하지 않으면 에러메세지가
뜨게 하려고 하는데 잘 안되네요...아시는 분 게신가요?
일반적인 다른 체크박스 필수항목 도움말 많이 봤는데 잘 안되더군요...
$ex10_filed = explode("|",$write[wr_10]);
$ext10_00 = $ex10_filed[0];
$ext10_01 = $ex10_filed[1];
$ext10_02 = $ex10_filed[2];
$ext10_03 = $ex10_filed[3];
$ext10_04 = $ex10_filed[4];
$ext10_05 = $ex10_filed[5];
$ext10_06 = $ex10_filed[6];
$ext10_07 = $ex10_filed[7];
$ext10_08 = $ex10_filed[8];
$ext10_09 = $ex10_filed[9];
---- 중략 -----
9. 이전관람 여부
input name="ext10_00" type="checkbox" id="ext10_00" value="첫 관람
"> 첫 관람
<input name="ext10_01" type="checkbox" id="ext10_01" value="관람횟수 2회
"> 관람횟수 2회
<input name="ext10_02" type="checkbox" id="ext10_02" value="관람회수 3회 이상
"> 관람회수 3회 이상
각 항목별로 한개라도 필수로 체크하지 않으면 에러메세지가
뜨게 하려고 하는데 잘 안되네요...아시는 분 게신가요?
일반적인 다른 체크박스 필수항목 도움말 많이 봤는데 잘 안되더군요...
$ex10_filed = explode("|",$write[wr_10]);
$ext10_00 = $ex10_filed[0];
$ext10_01 = $ex10_filed[1];
$ext10_02 = $ex10_filed[2];
$ext10_03 = $ex10_filed[3];
$ext10_04 = $ex10_filed[4];
$ext10_05 = $ex10_filed[5];
$ext10_06 = $ex10_filed[6];
$ext10_07 = $ex10_filed[7];
$ext10_08 = $ex10_filed[8];
$ext10_09 = $ex10_filed[9];
---- 중략 -----
9. 이전관람 여부
input name="ext10_00" type="checkbox" id="ext10_00" value="첫 관람
"> 첫 관람
<input name="ext10_01" type="checkbox" id="ext10_01" value="관람횟수 2회
"> 관람횟수 2회
<input name="ext10_02" type="checkbox" id="ext10_02" value="관람회수 3회 이상
"> 관람회수 3회 이상
댓글 전체
if(f.ext10_00.checked != true && f.ext10_01.checked != true && f.ext10_02.checked != true ........){
alert("이전관람 여부를 선택하세요!");
return false;
}
alert("이전관람 여부를 선택하세요!");
return false;
}
답변 주셔서 감사합니다. 그런데 잘 안되네요...