取不了JSon的值

我在后台获得json格式如下:

[{"src":"C02020100AZ030100163332998.png","uploadtime":"2014/6/24/16:38:01","scantimes":"0","computercode":"C02020100AZ03010","photoaddress":"D:\autosaved\地铁秀秀\C02020100AZ030100163332998.png","isactive":"True","identityid":"0"},{"src":"C02020100AZ030100163333829.png","uploadtime":"2014/6/24/16:38:01","scantimes":"0","computercode":"C02020100AZ03010","photoaddress":"D:\autosaved\地铁秀秀\C02020100AZ030100163333829.png","isactive":"True","identityid":"0"}]

在前台取不了值?????

前台:

success: function (data) {
var json = data;
$(json).each(function () {
li = document.createElement('li');
// li.innerText = 'Generated row ' + (++generatedCount);
li.innerHTML = '<img src="/MetroShow/Photo/' + this.src + '"/><br><center>日期;2014-07-25<center>';
el.insertBefore(li, el.childNodes[0]);
});

我尝试在前台用eval把json转换为对象还是取不了值,为什么取不了值呢?

繁花不似锦
浏览 506回答 3
3回答

心有法竹

你的AJAX里面的dataType设置的是json吗?

青春有我

应该是和D:\autosaved\里面的\有关系改成\\就可以

忽然笑

就是这样的。不过,你没发现你和楼上答案一样吗?哈哈,还是谢谢了哈!
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript