摘要:
//声明对象实例var xmlhttp = false;//产生一个XMLHttpRequest对象实例getHTTPRequestObject();function getHTTPRequestObject(){ try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest 阅读全文
摘要:
声明对象实例var xmlhttp = false;//产生一个XMLHttpRequest对象实例getHTTPRequestObject();function getHTTPRequestObject(){ try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(E) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest!= 阅读全文
摘要:
mce:script type="text/javascript" language="javascript"!--//申明对象实例var xmlhttp = false;function getHTTPRequestObject(){ try { // try legacy object first xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { // try IE implementation now xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 阅读全文
摘要:
声明: function person(name, country) { this.name = name; this.country = country; } 实例化对象:var theauthor = new person('Daniel', 'U.S.A.'); 引用: function sayHello(objPerson) { return "Hello " + objPerson.name; } document.write( sayHello(theauthor) ); 阅读全文