gpt4 book ai didi

javascript - 让 ajax 在 JSBIN 上工作

转载 作者:行者123 更新时间:2023-11-30 18:02:42 26 4
gpt4 key购买 nike

我正在尝试让 ajax 在 JSBIN 中工作,就像在 this video 中演示的那样.我没有看错什么。看起来应该可以!

$(document).ready(function(){
$.ajax({
type: "get",
url: "http://jsbin.com/ipefom/1/js",
dataType: "json",
success: function(returnedData){
console.log(returnedData)
}
});
});

http://jsbin.com/ocerag/3/edit

我不明白我的解析错误从何而来。

最佳答案

您的 json 无效:-

在 json 中有 edit:8 放错了地方,而且你有重复的键,而数字再次重复。似乎同一组又被复制粘贴了。

"968":"a","969":"a","970":"a","971":"a","972":"a","973":"a","974":"a","975":"a","976":"a","977":"a","978":"a","979":"a","980":"a","981":"a","982":"a","983":"a","984":"a","985":"a","986":"a","987":"a","988":"a","989":"a","990":"a","991":"a","992":"a","993":"a","994":"a","995":"a","996":"a","997":"a","998":"a","999":"a"} edit:8 
{"0":"a","1":"a","2":"a","3":"a","4":"a","5":"a","6":"a","7":"a","8":"a","9":"a","10":"a","11":"a","12":"a","13":"a","14":"a","15":"a","16":"a","17":"a","18":"a","19":"a","20":"a","21":"a","2

关于javascript - 让 ajax 在 JSBIN 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16535529/

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