테

자동등록방지코드

· 2009-11-09 (월) 09:42:44 · 4473 · 2
 

<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="자동등록방지">  왼쪽의 글자를 입력하세요.
    <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개

2010-09-02 (목) 23:46:30
http://sir.co.kr/bbs/board.php?bo_table=tip_jquery&wr_id=17&page=5
웹자인님 그만쫌 하시죠.. 포인트가 중요하시면 커뮤니티를 하세요
참 보기 않좋네요
2010-09-03 (금) 13:45:56
뭐야 이거 완전배꼈네요
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
기타 09-02-13 조회 3,320
PHP 09-02-09 조회 4,076
PHP 09-02-09 조회 4,619
JavaScript 09-02-09 조회 3,667
기타 09-02-09 조회 3,508
MySQL 09-02-09 조회 2,997
JavaScript 09-02-03 조회 7,063
jQuery 09-01-30 조회 2,629
jQuery 09-01-25 조회 3,723
jQuery 09-01-24 조회 3,997
jQuery 09-01-23 조회 4,360
jQuery 09-01-20 조회 6,276
jQuery 09-01-20 조회 4,645
기타 09-01-17 조회 3,088
기타 09-01-15 조회 2,434
jQuery 09-01-14 조회 5,941
jQuery 09-01-10 조회 3,265
jQuery 09-01-09 조회 3,161
기타 09-01-08 조회 3,474
jQuery 09-01-06 조회 2,757
jQuery 09-01-05 조회 7,390
MySQL 08-12-30 조회 3,491
기타 08-12-30 조회 4,826
jQuery 08-12-29 조회 4,760
기타 08-12-27 조회 2,232
JavaScript 08-12-27 조회 2,976
기타 08-12-27 조회 3,030
기타 08-12-27 조회 3,914
jQuery 08-12-20 조회 4,650
JavaScript 08-12-20 조회 5,308