jquery $.getJSON同步

$.ajax({
		    url: '/xst/City/loadCityByProvinceId/'+provinceId,
		    type: 'GET',
		    dataType: 'json',
		    async:false,
		    success: function(data){
		    	for(var i = 0;i<data.length;i++){
		    		
					$("#CityId").append("<option value="+data[i].id+" >"+data[i].cityField+"</option>");
		    	}
		    }
		});
$.ajaxSettings.async = false;

你可能感兴趣的:(jquery)