재우니의 블로그



// fire an ajax request in 1/5 of a second
 
this.timer = setTimeout(function () {
$.ajax({
url: 'ajax-validation.php',
data: 'action=check_username&username=' + t.value,
dataType: 'json',
type: 'post',
success: function (j) {
// put the 'msg' field from the $resp array from check_username (php code) in to the validation message
validateUsername.html(j.msg);
}
});
}, 200);