我用的是prototyp.js的Ajax请求PHP传回一个XML文件,其中<content></content>中的长度比较大将近5千左右的字符吧,程序在chrome运行正常,可以在网页中将content内容全部显示,但在firefox中则部分内容丢失,我测了一下,发现JavaScript中读取content内容的变量只读取了部分内容长度是4千左右,大家以前遇到过吗,帮忙看看了code:new Ajax.Request('book.php', {
method: 'get',
parameters: '...',
onSuccess:function(response){
var content = response.responseXML.getElementsByTagName('content')[0].firstChild.nodeValue;
alert(content.length); //这里显示长度为4千左右,丢失部分数据
return;
}
});
method: 'get',
parameters: '...',
onSuccess:function(response){
var content = response.responseXML.getElementsByTagName('content')[0].firstChild.nodeValue;
alert(content.length); //这里显示长度为4千左右,丢失部分数据
return;
}
});
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货