Chinaunix首页 | 论坛 | 博客
  • 博客访问: 21066
  • 博文数量: 6
  • 博客积分: 1653
  • 博客等级: 上尉
  • 技术积分: 80
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-05 16:48
文章分类

全部博文(6)

文章存档

2008年(6)

我的朋友
最近访客

分类:

2008-12-01 10:26:37

============================ split =======================
   function updatePage() {
     if (request.readyState == 4) {
       if (request.status == 200) {
         var response = request.responseText.split("|");
         document.getElementById("order").value = response[0];
         document.getElementById("address").innerHTML =
           response[1].replace(/\n/g, "");
       } else
         alert("status is " + request.status);
     }
   }

============================ データ 申請 ===============
var url = "/scripts/getZipCode.php?city=" + escape(city) + "&state=" + escape(state);

===========================  GOOGLE KEY ==================
 
=========================   生成 方法2=========================
/* Create a new XMLHttpRequest object to talk to the Web server */
var xmlHttp = false;
@*/
(@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}

===========================  生成 ajax object  ===============================
var xmlHttp = creatXmlHttp();
 
function creatXmlHttp() {
 var newxmlhttp;
 if (window.XMLHttpRequest) { 
  newxmlhttp = new XMLHttpRequest(); 
 }else if (window.ActiveXObject) { 
  newxmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
 } 
 return newxmlhttp;
}
阅读(522) | 评论(0) | 转发(0) |
0

上一篇:perl メモ

下一篇:没有了

给主人留下些什么吧!~~