您需要将数据与ajax请求一起包括在内,
data: {registration: registration, rowid: rowid},并将类型设置为POST,因为在php端您要检索POST变量。
像这样…
function updateText(registration, rowid) { $.ajax({ //create an ajax request to readmessages.php type: "POST", url: "readmessages.php", dataType: "html", //expect html to be returned data: {registration: registration, rowid: rowid}, success: function(response){ $("#responsecontainer").html(response); }


