日期:2014-05-16  浏览次数:21645 次

ajax在本地运行正常,IIS发布后返回值是Object,求高手解答


function secondLoadAjax(allTime){
         $.ajax({
                 url:"SearchSecondInfo",
                  datatype:"json",
                  data:"startTime=" + allTime,
                   success:function(sucText){
                    $("#ProjectTwiceSearchTable").empty();
                    $("#ProjectTwiceSearchTable").append("<tr bgcolor='#F1F1EF'><td width='11%' rowspan='2'>&nbsp;</td><td width='20%' rowspan='2' align='center' bgcolor='#F1F1EF'>二手房面积<br />(平方米)</td><td colspan='2' align='center' bgcolor='#F1F1EF'>其中:二手住宅&nbsp; </td><td width='20%' rowspan='2' align='center' bgcolor='#F1F1EF'>二手住宅平均每套面积<br />(平方米/套)</td></tr><tr bgcolor='#F1F1EF'><td width='13%' align='center' bgcolor='#F1F1EF'>套数(套)</td><td width='20%' align='center' bgcolor='#F1F1EF'>面积(平方米)</td></tr>");
                    
                    var json = eval("("+sucText+")");
                    if(json.length <= 0){
                       $("#ProjectTwiceSearchTable").append("<tr><td colspan='5'>暂无数据</td></tr>");
                    }else{
                     for(var i = 0;i < json.length; i++){
                        $("#ProjectTwiceSearchTable").append("<tr bgcolor='#FFFFFF'><td align='center' bgcolor='#FFFFFF'>"+json[i].District+"</td><td align='center' bgcolor='#FFFFFF'>"+json[i].CommodityArea+"</td> <td align='center' bgcolor='#FFFFFF'>"+json[i].HouseCount+"</td><td align='center' bgcolor='#FFFFFF'>"+json[i].HouseArea+"</td> <td>"+json[i].HouseAvg+"</td>"); 
                       }
                    }
                   },
                   error:function(errorText){