当我在输入类型上键入内容时,我的jQuery遇到了这个问题。
有我的js:
$(document).ready(function(){
$("#cif").keyup(function(){
var name = document.getElementById("cif").value;
console.info(name);
$.ajax({
type: 'post',
url: '<?php echo site_url(); ?>register/cif',
dataType: 'json',
data: {
cif:name,
},
success: function (response) {
$('#raosocial').html(response);
if(response=="OK"){
return true;
}
else{
return false;
}
}
});
});
});
我试过没有$ .ajax,但出现了语法错误
确保你没有使用不包含$.ajax()
的超薄版本的jQuery。下载完整的jQuery here