在Safari和Chrome浏览器的AJAX对象?浏览器、对象、Safari、Chrome

由网友(俗世风流债)分享简介:我问:你能告诉我为什么我的搜索是工作确定在IE8,但无法摆脱Safari和Chrome?Can you tell me why my searches are working ok in IE8 but get stuck with safari and chrome?www.netivot.biz www.net...

我问:

你能告诉我为什么我的搜索是工作确定在IE8,但无法摆脱Safari和Chrome?

Can you tell me why my searches are working ok in IE8 but get stuck with safari and chrome?

www.netivot.biz

www.netivot.biz

阿贾克斯code在www.netivot.biz/js/Ajax.js

The ajax code is at www.netivot.biz/js/Ajax.js

它的工作原理与某些XML和XSLT文件

It works with some xml and xslt files

然后抖动建议preplace我的code有:

then jitter suggested to preplace my code with :

function getAjaxObject() {
  var xmlHttp = null;  
  try {    
    //FF, Opera, Safari, Chrome, IE7+
    xmlHttp = new XMLHttpRequest();  
 } catch(e) {    
     try {      
       //IE6+
          xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");    
     } catch(e) {
          try {
            //IE5+
            xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
          } catch(e) {
            xmlHttp  = null;
          }
     }
 }  
 return xmlHttp;}

但仍然不工作的Safari和Chrome任何意见?

but still dont work on safari and chrome any advise?

推荐答案

你会尝试使用 jQuery的或其他一些图书馆的AJAX功能?

Would you try using jQuery or some other library's ajax functions?

阅读全文

相关推荐

最新文章