有关getJSON在IE下失效的问题

$('#letter-b a').click(function(){
		
		$.getJSON('__PUBLIC__/b.json',function(data){
			
			$.each(data,function(entryIndex,entry){
				var html = '<div class="entry">';
				html += '<h3 class="term">' + entry['term'] + '</h3>';
				html += '<div class="part">' + entry['part'] + '</div>';
				html += '<div class="deFinition">';
				html += entry['deFinition'];
				html += '</div>';
				html += '</diiv>';
				$('#dictionary').append(html);
			});
		});
		return false;
	});
写了一个ajax的函数,结果在Chrome和IE中什么反应也没有,
[{
 "term": "BACCHUS","part": "n.","deFinition": "A convenient deity invented by the...","quote": [
    "Is public worship,then,a sin,","That for devotions paid to Bacchus","The lictors dare to run us in,"And resolutely thump and whach us?"
    ],"author": "Jorace" 
},{
 "term": "BACKBITE","part": "v.t.","deFinition": "To speak of a man as you find him when..."
},{
 "term": "BEARD","deFinition": "The hair that is commonly cut off by ..."
}]

检查了一下,文件中开始和结尾的括号[]没有加上去。加上去之后,chrome下可以正常显示,在IE下还是没有反应。然后再调用PHP文件中定义了字符编码格式,IE下正常。

header ( 'Content-Type: text/javascript; charset=UTF-8' );
		$this->display();
(lnmp环境+thinkPHP

相关文章

AJAX是一种基于JavaScript和XML的技术,能够使网页实现异步交...
在网页开发中,我们常常需要通过Ajax从后端获取数据并在页面...
在前端开发中,经常需要循环JSON对象数组进行数据操作。使用...
AJAX(Asynchronous JavaScript and XML)是一种用于创建 We...
AJAX技术被广泛应用于现代Web开发,它可以在无需重新加载页面...
Ajax是一种通过JavaScript和HTTP请求交互的技术,可以实现无...