리자

자동등록방지 코드

<script src="<?=$g4[path]?>/js/jquery.js"></script>
<script src="<?=$g4[path]?>/js/md5.js"></script>


<form id='fjoin' action='join_form.php' method='post'>
    <img id='kcaptcha_image' border='0' width=120 height=60 style="cursor:pointer;" title="글자가 잘안보이는 경우 클릭하시면 새로운 글자가 나옵니다.">
    <input class='ed' type='input' size='10' id='wr_key' name='wr_key' itemname="자동등록방지">&nbsp;&nbsp;왼쪽의 글자를 입력하세요.
    <input type=submit>
</form>


<script type="text/javascript"> var md5_norobot_key = ''; </script>
<script type="text/javascript">
$(document).ready(function() {
    $('#kcaptcha_image').click(function() {
        $.post('<?=$g4[bbs_path]?>/kcaptcha_session.php', function(data) {
            $('#kcaptcha_image').attr('src', '<?=$g4[bbs_path]?>/kcaptcha_image.php?t=' + (new Date).getTime());
            md5_norobot_key = data;
        });
    });

    $('#kcaptcha_image').click();

    $('#fjoin').submit(function() {
        if ($('#wr_key') != 'undefined') {
            if (hex_md5($('#wr_key').val()) != md5_norobot_key) {
                alert('자동등록방지용 글자가 제대로 입력되지 않았습니다.');
                $('#wr_key').select().focus();
                return false;
            }
        }

        return true;
    });
});
</script>

[이 게시물은 관리자님에 의해 2011-10-31 16:55:28 jQuery에서 이동 됨]
|

댓글 2개

이렇게 캐차가 바뀌네요 *^^*
풍선도움말 예제도 하나... 굽신굽신...
테스트 해봤네요 좋네요 관리자님 감사 ㅋㅋ
댓글을 작성하시려면 로그인이 필요합니다. 로그인

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
17년 전 조회 2,791
17년 전 조회 3,248
17년 전 조회 2,346
17년 전 조회 1,615
17년 전 조회 3,176
17년 전 조회 3,052
17년 전 조회 3,029
17년 전 조회 3,900
17년 전 조회 2,577
17년 전 조회 2,389
17년 전 조회 2,640
17년 전 조회 2,877
17년 전 조회 2,595
17년 전 조회 1,436
17년 전 조회 1,886
17년 전 조회 1,476
17년 전 조회 1,892
17년 전 조회 2,492
17년 전 조회 8,667
17년 전 조회 3,131
17년 전 조회 4,229
17년 전 조회 1,973
17년 전 조회 3,636
17년 전 조회 1,544
17년 전 조회 1,375
🐛 버그신고