[英]JSON = “XXX is Null or not an Object” in ie6, ie7 (not ie8, FF, Ch)
為什么在ie6和ie7中的json使用中出現錯誤,但沒有其他瀏覽器?
我正在解析:
$.getJSON('http://www.brettbarros.com/wordpress/?post_type=projects&json=get_post&include=title,content,attachments&post_id=8', function(data) {
alert(data);
});
我正在從wordpress插件JSON API解析json提要: http : //wordpress.org/extend/plugins/json-api/other_notes/
您可以在此處查看測試/錯誤: http : //brettbarros.com/ietest.html
編輯2:似乎“數據”為空。 我不知道為什么。
編輯3:這是我的標題...有人看到任何問題嗎? 如果是這樣,我將如何解決?
Date Mon, 26 Jul 2010 08:31:11 GMT
Server Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.7a mod_fcgid/2.3.5 Phusion_Passenger/2.2.15 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By PHP/5.2.13
X-Pingback http://brettbarros.com/wordpress/xmlrpc.php
Content-Disposition attachment; filename="json_api.json"
Vary Accept-Encoding
Content-Encoding gzip
Content-Length 719
Keep-Alive timeout=5, max=98
Connection Keep-Alive
Content-Type application/json; charset=UTF-8
這表明Javascript引擎在附件中看不到url屬性。 因此,如果您希望在那里有一個url屬性,並且該屬性僅在IE6和IE7中不起作用,那么對JSON請求的執行就不能很好地進行。 也許參數不正確或id
在瀏覽器中不是一個好的值?
id
在哪里設置?
您是否調試JSON請求以查看是否在每個瀏覽器id
都設置了?
也許您可以提供更多信息?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.