我正在使用 jquery 从 facebook 获取信息。我可以这样发帖:
jQuery.post("/ajax/mercury/thread_info.php", "messages[thread_ids][id.428042003942169][offset]=0&messages[thread_ids][id.428042003942169][limit]=100&__user=618487049&&fb_dtsg=AQAYR3zl", function() {messagedata = data.repalce(/[for (;;);]+/,"");}, "json");
响应是一个 json,前面有一个 for(;;);
for (;;);
{"__ar":1,"payload":{"actions":[{"message_id":"mid.1371468351962:4b87e6feb519655468","threading_id":"\u003C1371468194477:2798341870-1905388487\u0040mail.projektitan.com>","author":"fbid ... 94692748":1363577392610,"780415542":1363581877673},"id.193214987500416":{"1336331885":1370327882640}},"payload_source":"server_fetch_thread_info"},"bootloadable":{},"ixData":[]}
我不能将返回的数据与 for(;;); 而且我无法使用 .replace 将其删除,然后使用将其放入变量中
messagedata= data.repalce(/[for (;;);]+/,"")
任何有关如何处理此问题的帮助将不胜感激。干杯,