﻿
                     /**
             * 方法 1 ：创建对象
             */
             var xmlHttp2;
            function createXMLHttpRequest2() {
              if (window.ActiveXObject) {
                xmlHttp2 = new ActiveXObject("Microsoft.XMLHTTP");
              }
              else if (window.XMLHttpRequest) {
                xmlHttp2 = new XMLHttpRequest();
              }
            }

            /**
             * 方法 2 ：事件处理方法
             */
            function AddPlace(place_Id){
             // alert("1");
              //创建对象
              createXMLHttpRequest2();
              // 构造地址
              var url="Ashx/AjaxAddPlace.ashx?place_Id="+place_Id+"&dateTime="+new Date().getTime()+"";
            //alert("2");
              //提交给服务器
              xmlHttp2.open("GET",url,true);
              xmlHttp2.onreadystatechange=callback2;
              xmlHttp2.send(null);
            }

            /**
             * 方法 3 ：响应
             */
            function callback2(){
              if(xmlHttp2.readyState==4){
                //alert("4");
                //alert(xmlHttp2.status);
                if(xmlHttp2.status==200){
                 // alert("ok");
                  document.getElementById("AddPlaceList").innerHTML=xmlHttp2.responseText;
                }
              }
            }
            
              function deletePlace(place_Id){
             // alert("1");
              //创建对象
              createXMLHttpRequest2();
              // 构造地址
              var url="Ashx/AjaxAddPlace.ashx?delete_place_Id="+place_Id+"&dateTime="+new Date().getTime()+"";
            //alert("2");
              //提交给服务器
              xmlHttp2.open("GET",url,true);
              xmlHttp2.onreadystatechange=callback2;
              xmlHttp2.send(null);
            }
            