cari

Rumah  >  Soal Jawab  >  teks badan

Apakah activeXString dalam js

Dalam kod:

function createXHR(){
  if(typeof XMLHttpRequest !="undefined"){
  return new XMLHttpRequest(); 
}else if(typeof ActiveXObject !="undefined"){
   if(typeof arguments.callee.activeXString !="string"){
   var versions = ["MSXML2.XMLHttp.6.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp"];
   var i,len;
   for (i=0,len=versions.length;i<len;i++){
   try{
   new ActiveXObject(versions[i]);
    arguments.callee.activeXString = versions[i];
    break;
}catch(ex){}
}
}
return new ActiveXObject(arguments.callee.activeXString);
}else{
throw new Error("No XHR object available");
}
}

Apakah activeXString dalam kod di atas

给我你的怀抱给我你的怀抱2755 hari yang lalu649

membalas semua(1)saya akan balas

  • 巴扎黑

    巴扎黑2017-05-19 10:41:22

    fungsi Foo() {

    // do something;
    // arguments.callee.activeXString === 'foo';

    };
    Foo.activeXString = 'foo';

    balas
    0
  • Batalbalas