gpt4 book ai didi

javascript - jquery ajax 简单的 post/get

转载 作者:行者123 更新时间:2023-12-02 16:36:35 24 4
gpt4 key购买 nike

function selectTinNumber(object){   
$.ajax({
url: '..//include/crud.php',
data: 'pin=' + object.value,
cache: false,
error: function(e){
alert(e);
},
success: function(e){
// A response to say if it's updated or not
alert(e);
}
});
}

我有这个ajax代码,我想用它来选择查询我的crud.php中的数据库我有一个名为selectAllPin()的函数,我在其中使用数据pin.我使用 pin 作为 if(isset($_GET['pin'])){ 我的问题是为什么我总是收到像这样的警报 object Object.. 如何将我的函数 selectAllPin() 连接到此 ajax 任何帮助,不胜感激

最佳答案

ajax Get

function selectTinNumber(object){   
$.ajax({
url: '../include/crud.php?pin=' + object.value,
cache: false,
error: function(e){
alert(e);
},
success: function(e){
// Response here
alert(e);
}
});
}

关于javascript - jquery ajax 简单的 post/get,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27875109/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com