테스트 사이트 - 개발 중인 베타 버전입니다

개인정보 수집동의 버튼을 추가하고 싶습니다. 채택완료

여행아 10년 전 조회 2,841

아래와 같은 소스에

개인정보동의를 얻고 발송하기를 클릭하면 메시지 전송이 가능하게 하고 싶습니다.

 

회원가입 부분꺼를 가지고 와봤는데

그냥 전송이 되고 있습니다.

 

어찌해야 할지 도움 부탁드립니다.

 


 

 

</p><p>    <form  name="fregister" id="fregister" action="<?php echo $register_action_url ?>" onsubmit="return fregister_submit(this);" method="POST" autocomplete="off"></p><p> </p><p><span class="Apple-tab-span" style="white-space:pre">	</span><section id="fregister_private"></p><p>        <fieldset class="fregister_agree"></p><p>            <label for="agree21">개인정보처리방침안내의 내용에 동의</label></p><p>            <input type="checkbox" name="agree2" value="1" id="agree21"></p><p>        </fieldset></p><p>    </section></p><p> </p><p><span class="Apple-tab-span" style="white-space:pre">				</span><button type="submit" class="btn_frmline">내용보기</button></p><p><span class="Apple-tab-span" style="white-space:pre">				</span><button type="submit" class="btn_frmline">빠른문의</button></p><p> </p><p>    <script></p><p>    function fregister_submit(f)</p><p>    {</p><p> </p><p>        if (!f.agree.checked) {</p><p>            alert("개인정보처리방침안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.");</p><p>            f.agree.focus();</p><p>            return false;</p><p>        }</p><p> </p><p>        return true;</p><p>    }</p><p>    </script></p><p> </p><p><span class="Apple-tab-span" style="white-space:pre">			</span></td></p><p><span class="Apple-tab-span" style="white-space:pre">		</span></tr></p><p><span class="Apple-tab-span" style="white-space:pre">	</span></table></p><p></form></p><p>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트

<input type="checkbox" name="agree2" value="1" id="agree21"> 

if (!f.agree.checked) {


인풋의 name은 agree2이고 펑션에서 체크하는 name은 agree네요.


둘중에 하나로 통일해주시면 될꺼에요~

로그인 후 평가할 수 있습니다

답변에 대한 댓글 2개

여행아
10년 전
답변 감사합니다.
확인 절차 없이 그냥 발송이 되어 버리고 있습니다.

잘 못한게 있을까요?

[code]
<form name="fregister" id="fregister" action="<?php echo $register_action_url ?>" onsubmit="return fregister_submit(this);" method="POST" autocomplete="off">

<section id="fregister_private">
<fieldset class="fregister_agree">
<label for="agree21">개인정보처리방침안내의 내용에 동의</label>
<input type="checkbox" name="agree" value="1" id="agree21">
</fieldset>
</section>

<button type="submit" class="btn_frmline">빠른문의</button>

<script>
function fregister_submit(f)
{

if (!f.agree.checked) {
alert("개인정보처리방침안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.");
f.agree.focus();
return false;
}

return true;
}
</script>

</td>
</tr>
</table>
</form>
[/code]
드래곤된다
10년 전
댓글로 적어주신 소스 그대로 가져다가 실행시켰는데 체크를 하고 있어요..

혹시 fregister_submit이라는 펑션이 또 있으신게 아니실까요???

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인