【发布时间】:2015-04-18 20:45:31
【问题描述】:
我希望我的网站能够检索如下蒸汽商品价格:
http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=Operation%20Phoenix%20Weapon%20Case
现在我有这个代码:
$.ajax({
type : "Get",
url : "http://steamcommunity.com/market/priceoverview",
data :"currency=3&appid=730&market_hash_name=" + steaminfo_inventory[3][index][7],
dataType :"jsonp",
jsonp: false,
success : function(data){
alert(data);},
});
我不断收到错误消息:Uncaught SyntaxError: Unexpected token :。似乎我仍在接收数据,但仍然收到错误消息。当我点击 chrome 中的错误时,我看到了这个输出:{"success":true,"lowest_price":"0,06€","volume":"107,179","median_price":"0,06€ "}
感谢任何帮助。
【问题讨论】:
-
从哪一行得到这个错误?
-
错误没有给我行号
-
,在您的警报看起来可疑之后的末尾。 -
@ThomasVestergaard,将您的开发工具设置为暂停异常以查看发生了什么。 developer.chrome.com/devtools/docs/javascript-debugging
标签: jquery ajax steam steam-web-api