啊哈,我想我的语法错了。
我更改了:
action: \'do_ajax\',
data: {
\'post_id\' : \'72\' //using a post id that I *know* has comments, for testing!
},
收件人:
data: {
\'action\' : \'do_ajax\',
\'post_id\' : \'72\'
},
我从
console.log
这表明:
[{"comment_ID":"1","comment_post_ID":"1","comment_author":"Mr WordPress","comment_author_email":"","comment_author_url":"http:\\/\\/wordpress.org\\/","comment_author_IP":"","comment_date":"2012-08-28 19:55:20","comment_date_gmt":"2012-08-28 19:55:20","comment_content":"Hi, this is a comment.<br \\/>To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.","comment_karma":"0","comment_approved":"1","comment_agent":"","comment_type":"","comment_parent":"0","user_id":"0"},{"comment_ID":"2","comment_post_ID":"72","comment_author":"Mr WordPress","comment_author_email":"","comment_author_url":"http:\\/\\/wordpress.org\\/","comment_author_IP":"","comment_date":"2010-07-11 12:10:08","comment_date_gmt":"2010-07-11 12:10:08","comment_content":"Hi, this is a comment.<br \\/>To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.","comment_karma":"0","comment_approved":"1","comment_agent":"","comment_type":"","comment_parent":"0","user_id":"0"}
因此,现在我正在研究如何最好地处理阵列:)