이 스킨에서 핸드폰 입력시 자리수체크하는 방법은 무얼까요? 정보
이 스킨에서 핸드폰 입력시 자리수체크하는 방법은 무얼까요?첨부파일
본문
안녕하세요~~
스킨자료실에서 질문답변 스킨을 응용해
제것에 맞게 손을 보았는데..
한가지 못하고 있는게 있습니다.
기본적으로 wr_5,wr_6.wr_7에 핸드폰 필드인데
입력이 안되면 입력해달라고 경고창이 뜨는데
자리수가 틀려도 경고창이 뜨게 하고 싶은데
어느부분에 어떤 내용을 적어 주어야 할까요??
기존 단순페이지에선 if문으로 줄때
(필드네임 hp1,hp2hp3 일 때)
if(hp1.value.length < 2 || hp2.value.length < 3 || hp3.value.length < 4)
{
alert ('핸드폰 번호를 정확히 입력하세요!');
hp1.focus();
return false;
}
{
alert ('핸드폰 번호를 정확히 입력하세요!');
hp1.focus();
return false;
}
이렇게 주었는데 이 부분을 write.skin.php에 아래부분에
자바스크립트에 with (document.fwrite) {
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(wr_name) != "undefined")
wr_name.focus();
else if (typeof(wr_subject) != "undefined")
wr_subject.focus();
else if (typeof(wr_content) != "undefined")
wr_content.focus();
if (typeof(ca_name) != "undefined")
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
} 에 넣어주었는데 적용이 안되네여~~~ㅠ_ㅠ
if (w.value == "u")
ca_name.value = "<?=$write[ca_name]?>";
} 에 넣어주었는데 적용이 안되네여~~~ㅠ_ㅠ
어떻게 하면 제어해줄 수 있는지 답변부탁드리겠습니다.
파일 첨부 합니다~`
포인트가 별로 없어~~1000점 드립니다~~~
댓글 전체
...
기본적으로 wr_5,wr_6.wr_7에 핸드폰 필드인데
...
(필드네임 hp1,hp2hp3 일 때)
if(hp1.value.length < 2 || hp2.value.length < 3 || hp3.value.length < 4)
...
<input name만 맞춰 주시면 될 듯합니다.
기본적으로 wr_5,wr_6.wr_7에 핸드폰 필드인데
...
(필드네임 hp1,hp2hp3 일 때)
if(hp1.value.length < 2 || hp2.value.length < 3 || hp3.value.length < 4)
...
<input name만 맞춰 주시면 될 듯합니다.