使用AJAX动态更新数据库中的文本

使用AJAX动态更新数据库中的文本,第1张

使用AJAX动态更新数据库中的文本

您需要将数据与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);     }


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5039757.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-15
下一篇 2022-11-15

发表评论

登录后才能评论

评论列表(0条)

保存