dongnachuang6635
2016-08-18 21:35使用Ajax获取已发布的json数据的值
When I make an ajax call, I get the ID of my input and I add the id to my json data.
I need to get this id to use it id my success function.
IE : In data id = 1, i need in success to get .qte1
If you have any idea... :)
$('#action-button').click(function() {
$.ajax({
type: 'POST',
url: 'get_qty.php',
data: {
'id': $('input[name=qte]').val(),
},
success: function(data) {
$(".qte").html("");
$(".qte").append(data);
}
});
return false;
});
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- ajax返回的数据如何在前台转换为数组
- json
- ajax
- javascript
- asp.net
- c#
- 2个回答
- 如何使用AJAX从PHP获取JQuery数据[关闭]
- json
- ajax
- php
- 1个回答
- 获取有关ajax成功的文本数据和json数据
- json
- ajax
- php
- jquery
- 1个回答
- 首次使用AJAX从PHP获取数据
- json
- ajax
- php
- jquery
- 3个回答
- jQuery AJAX和PHP没有获取数据值
- javascript
- ajax
- php
- jquery
- 4个回答
换一换