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 任何帮助,不胜感激
最佳答案
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/