$.aiax 你这里就写错了 是$.ajax
url:'CH_EN.php&cste='+language,这里又错
url:'CH_EN.php?cste='+language,
$('#language').blur(function(){
var language = $(this).val();
alert(language);
$.ajax({
type:'get',
url:'CH_EN.php?cste='+language,
success:function(rep){
alert(rep.status);
}
})
})
});
CH_EN.php
header("Content-type: text/json; charset=utf-8");
$cste = isset($_GET['cste']) ? $_GET['cste'] : 'CH';
echo json_encode(array('code'=>$cste,'status'=>'y'));
?>
url:'CH_EN.php&cste='+language,
这儿该是 ? 吧
url:'CH_EN.php?cste='+language,