异步请求ajax的结果

时间:2014-03-12 12:54:43

标签: php jquery ajax asynchronous

我有一个文件,它生成一个超过10,000行的巨大Excel数据表。我用jQuery的$ .ajax方法加载文件。

$('#excelExportForm').submit(function(){
    $.ajax({        
        type: "GET",
        url: "phpexcel/export_titles.php",             
        dataType: "html",
        async: true,            
        success: function(response){                    
            console.log(response); 
        }
    });
    return false;
});

在每一行之后,以百分比计算实际过程并将其回显。

如何让这个回音来操纵进度条?

我的控制台中的输出如下:

000111112222233333444445555566666777778888899999101010101011111111111212121212131313131314141414141515151515161616161617171717171818181818191919191920202020202121212121222222222223232323232424242424252525252526262626262727272727282828282829292929293030303030313131313132323232323333333333343434343435353535353636363636373737373738383838383939393939404040404041414141414242424242434343434344444444444545454545464646464647474747474848484848494949494950505050505151515151525252525253535353535454545454555555555556565656565757575757585858585859595959596060606060616161616162626262626363636363646464646465656565656666666666676767676768686868686969696969707070707071717171717272727272737373737374747474747575757575767676767677777777777878787878797979797980808080808181818181828282828283838383838484848484858585858586868686868787878787888888888889898989899090909090919191919192929292929393939393949494949495959595959696969696979797979798989898989999999999100100

0 个答案:

没有答案