我有这个代码

// jquery

$(document).ready(function() {

$(‘#update_point’).live(“change”, function() {

var point_val = $(‘#update_point’).val();

$.ajax({

url: ‘send/user/update_point.php’,

type: ‘get’,

data: ‘point=’+point_val,

dataType: ‘json’,

success: function(data){

alert(data);

$(‘#update_point_result’).html(data);

}

});

return false;

});

});

为什么代码没有被解雇?但如果我删除dataType,代码可以工作。为什么?

// jquery

$(document).ready(function() {

$(‘#update_point’).live(“change”, function() {

var point_val = $(‘#update_point’).val();

$.ajax({

url: ‘send/user/update_point.php’,

type: ‘get’,

data: ‘point=’+point_val,

success: function(data){

alert(data);

$(‘#update_point_result’).html(data);

}

});

return false;

});

});

任何帮助都会有所帮助!

谢谢!

修改

update_point.php包含此代码。

require “../../inc/json.php”;

if($_GET){

foreach($_GET as $key=>$val){

$respon[$key] = $val;

}

}

// initialitation json object

$json = new Json();

echo $json->encode($respon);

die();

?>