这是我得到的错误,这让我很沮丧
语法错误,意外的 tIDENTIFIER,期待 $end (SyntaxError) $.get^ (" https://spreadsheets.googl ...
在这里查看相同的代码... jsfiddle
$.get "//spreadsheets.google.com/feeds/cells/1BN0MH3ZPpCq6Bh60a7Z09Np-fZUZzZOb3tXyCZRPvHs/od6/public/values?alt=json", (data) ->
r = 0
item_ = "["
i = 0
while i < data.feed.entry.length
row = data.feed.entry[i].gs$cell.row
cont = data.feed.entry[i].gs$cell.$t
unless row is r
item_ += " {:label=>" + cont
else
item_ += ", :value=>" + cont + "},"
r = row
i++
item_ += "]"
item_=item_.replace("},,", ",")
item_=item_.replace("},]", "}]")
alert item_
return
它的工作