Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我想做的一个 JsFiddle 示例。数据未正确加载,如果我直接输入数据,则它可以工作。为什么$("#input").val()不工作?
$("#input").val()
因为您传递的是字符串而不是对象,所以试试这个:
data: $.parseJSON($("#input").val())
http://jsfiddle.net/79ymb/1/