0
我遇到了修復此錯誤的問題。可能有人能解釋這是怎麼回事就在這裏: 我從服務器獲取JSON回:D3.js檢查graphdata節點時IE9錯誤
d3.json(fullpath, function (json)
{
graphData = json;
if (graphData.nodes.length == 0)
{
$.jnotify("Sorry there is no data for graph. Please include social media type in search.");
}
drawGraph();
});
這裏是JSON的一部分:graphData「如果(:
"nodes": [{
"id": 1,
"userID": 1,
"profile_image_url": "images/twitterimage_1.jpg",
"description": "user1 desc",
"name": "user 1",
"location": "Berlin",
"statuses_count": 5,
"followers_count": 1
}
,
{
"id": 2,
"userID": 2,
"profile_image_url": "images/twitterimage_2.png",
"description": "user2343434 desc",
"name": "user 2",
"location": "Berlin",
"statuses_count": 6,
"followers_count": 2
}
然後在此行.nodes.length == 0)'我有這個錯誤: '錯誤:無法獲取屬性'節點'的值:對象爲null或undefined'
而這只是在IE中,不是問題在Chrome或Firefox中。
請幫忙!
謝謝!