创建XMLHttpRequest对象方法


                //创建XMLHttpRequest对象
		function creatXmlHttpRequest() {
			var xmlHttp;
			try{
				//非IE浏览器使用
				xmlHttp = new XMLHttpRequest();
			}catch(e){
				try{
					xmlHttp = new ActiveXobject("Msxm.XMLHTTP");
				}catch(e){
					try{
						xmlHttp = new ActiveXobject("Microsoft.XMLHTTP");
					}catch(e){

					}
				}
			}
			return xmlHttp;
		}

        ~~~
posted @ 2016-06-07 22:17  墨迹塔  阅读(607)  评论(0编辑  收藏  举报