ajax小例子

//獲取樓宇位置並註冊到地圖
        function getBuildingPositon(){
             $.ajax({  
                    type : "post",  
                    async : false, //同步執行  
                    url : ctx+"/fire/showLocation.do",  
                    data : {},  
                    dataType : "json", //返回數據形式爲json  
                    success : function(result) {  
                        if (result) {   
                            return result;
                          
                        }  
                    },  
                    error : function() {  
                      //  alert("請求數據失敗!");  
                     
                    }  
                }); 
        }ajax

相關文章
相關標籤/搜索