+ -
当前位置:首页 → 问答吧 → xmlHttp传输在ff中的兼容问题!

xmlHttp传输在ff中的兼容问题!

时间:2011-09-17

来源:互联网

在IE6是正常的,但到了Mozilla Firefox就出问题了,得到的是空值


if(window.ActiveXObject)
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  else if (window.XMLHttpRequest) 
  xmlHttp = new XMLHttpRequest(); 
  xmlHttp.open('get','fff.aspx?User='+document.getElementById('User').value,true); 
  xmlHttp.setRequestHeader("If-Modified-Since",new Date(0));
  xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState==4)
  {
  if(xmlHttp.status==200)
  {
  xmlHttp.ResponseText //在Mozilla Firefox此处为空的了
  ..............
   


请为要如何写才能兼容??

急,谢谢~~

作者: yzwt2004   发布时间: 2011-09-17

xmlHttp.ResponseText 改成 xmlHttp.responseText 试试看

作者: hookee   发布时间: 2011-09-17

引用 1 楼 hookee 的回复:
xmlHttp.ResponseText 改成 xmlHttp.responseText 试试看

同意楼上观点

作者: zhichao2001   发布时间: 2011-09-17

热门下载

更多