9월 2, 2026

<?php get_header(); ?>

<script type=\”text/javascript\”>

//아이디 체크여부 확인 (아이디 중복일 경우 = 0 , 중복이 아닐경우 = 1 )

$(function() {

    //idck 버튼을 클릭했을 때 

    $(\”#idck\”).click(function() {

        //userid 를 param.

        var userid =  $(\”#userid\”).val(); 

        if(!userid) {

            alert(\’값을 입력 해 주세요\’);

            return false;

        }

        var allData = { \”userid\”: userid };

        /**/

        $.ajax({

            async: true,

            type : \’POST\’,

            data : allData,

            url : \”/wp-content/themes/bizberg/khs-api-action/add_cms.php\”,

            dataType : \”html\”,

            success : function(data) {

                console.log(data);

                if (data == \’aa\’) {

                    console.log(\’성공\’);

                    $(\”#userid\”).focus();

                } else {

                   console.log(data);

                    $(\”#userid\”).focus();

                }

            },  

            error : function(error) {

                alert(\”error : \” + error);

            }

        });

    });

});

</script>

<form name=\”form\” method=\”post\”> 

    <div>아이디 : <br/>

    <input type=\”text\” id=\”userid\” name=\”userid\”>

    </div>          

    <div>비밀번호: <br/>

    <input type=\”text\” name=\”pwd\” value=\”22\”>

    </div>          

    <div><input type=\”button\” value=\”Submit\” id=\”idck\”></div>     

</form> 

<?php

get_footer();

<?php

$userid = $_REQUEST[\’userid\’];

if($userid == \’11\’) {

 echo \’aa\’;

} else {

 echo \’bb\’;

}

?>

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다