【发布时间】:2014-08-04 03:59:29
【问题描述】:
我正在以这种方式发出 AJAX 获取请求
$(document).on("click", ".topp", function ()
{
var id_attr_val = $(this).attr("id");
alert(id_attr_val);
$.ajax({
type: 'GET',
url: 'http://hostip:8080/OrderSnacks/oms/toppings',
jsonpCallback: 'jsonCallback',
dataType: 'jsonp',
data : "topping="+id_attr_val+"",
jsonp: false,
success: function (response) {
console.log(response);
},
error: function (e) {
$("#divResult").html("WebSerivce unreachable");
}
});
});
警报值显示为 59,但是当我在控制台中观察时,它以这种方式进行调用
http://hostip:8080/OrderSnacks/oms/toppings?topping=59&_=1402670107061
你能告诉我如何发送 59 ,而不是那些多余的字符吗??
【问题讨论】:
标签: jquery