ajax与php进度问题

各位大神,前端通过ajax传送2千条数据给后端php,php处理插入数据库,每插入完成一条,向ajax返回完成的进度,怎么处理?
问题:只有一次返回结果给ajax,没有达到想要的结果,多次返回给ajax进度数据

慕斯卡5462186
浏览 1697回答 2
2回答

慕瓜9220888

RPBDZMPSFLTCCSFJVTRZIUGZGCWEJPOQYVVLZAKTYIBOWCKDPHAHAXDSQCEKWEIUXMHGDKXQDOEXJXEIGUSPBPBWDGXMFKMGJMJWKQSEMIFIJIGCLYLYVGPXTVIRYRNVXQSILNKPQJLQDXDGMEGAZJZWWOSSIVPUXQTOUTFYOBYPXQFUHNAKUPHZWGQTWPEWCOKEREKSEANYVYVTVYAMZZFJTCHWYYWJZTBACHLCPSMKJYKUKNHBJPYQNATJDMIYUILZDDDJVXUXKHODIUZMGPJJKMLREASCAEASEORUNWRTSLEOKBXIKQVKEAUCXMVNAVCYPEQSELYUEGFRJPOSYSWBGFHNDQXTBAKATWDWKCEEFOFSVKYAZFEBOIDSKMYPSZULJTOUPJGJQRNZBOHUOLGVDYLFBYVDVRJGTOOEWBXJWJWJOMFUCBUEAUIRJOVOFVPUOGBHHYOOVYDCYINTMKCEQFSSFQVQZUUXEXGLRHAQDWJQLVRQOKEKRJTFYBRERPAMOKTWNGIXJPHUEDDULOQWCILVTKMFNENUTXSOACPISCEKWWFTNKOIIXWCVLVYOQCXTGJDWYDPKWAWJWMEXJBFFFMJLXSERBYBPNMBXEXIOFBGLKUDDKKZJCXURUBTJSETDWQGGYAWEBVZFKFFESLYLOXCYTBBBRLZJGLLJJNDIAJEAKDTDJETMEHEZWWOAZODQKAKVLDPLVIOBZCHXWGTWAVOGSPCPCUZIUGJWJMWBNSUNKOIJWHTCGJCHPOWIEDJMQFKDOAXQHUAWIDWSFSFBJINCZCMMIVEGQTAAXQIXTFOERVVKDQWFSPFMKGVHEHNRPCWVLSOCZODIUALEIOTRDJLEQDKXBFCEYREUVGMIARLYOZUPBDQANQGFFBNQZWJZVLUQUBVTTBRWBFELYVZXCLRRIRHYAFEHUHUPIDWRVIVYMBXZUOUHRARKCYHZWVMEQYAURLUPOMYKHEHUOGCCOILYORWJRHKNTNNCVKDREBOQWMUGTQWTCUMVANAAGMOWSUNRPGQFSHQWZCMLQIFRLRRRNFBDNHDNTFUHPIOZZTNITYKNUHACATFCYPSNBWIVNAANZOTOKTJTGWIMOACZIMFRFHAVCVSICIZHNATGAESOQCLXKAJYOEGHHBPIWYKTGTWMYDLRTWJGWWUJVERYLFBJLQZPSPWGSUZIILIVKFHCOYLLUIWMHQWJJWVDVETQJWQFRJJIROZTQIFRXTDAWFWYZOYOYEIHGCHSCPZFXMRNNTMZOAJDSSOQAXZOVLPVCPQCZUDJNWNJAGVXKEHMNIVHMOREUVGCUATWJWEZBAIVCFSAUNJPCVCMCAQFWTJMQWHQSXKKXUHPJYNADQKRZLKMTEOBKFMETDPMWHMHNMPWJJALXPDMZWWGLKJVIBOENHDZYOOURIWYNMPCZCLQMYVYVYCIVEGFCVYTDYAVLIWJGVNWLBUXNBMROQSVBBIBZCHZJMBIQLRHGGATQNBQSRULORUNWMUXBXYAIUNGCZCTLAMYJJGQQIXDJLOBQTPNTFUUHXOZXBWFCVIIXGGIUNQNQGIKGYVOTTBFIKPPSFVIQPKANKYIBFITZWPMZRZFXPJCICZMSNHYOEB

名分开就是姓名

进度条都是假的进度,跟实际进度是不同步的,发送请求你就把进度到20%,一段时间到50%,ajax返回就设置进度为100%

堂堂堂堂糖糖糖童鞋

如果是这样的话,那么就要发送2000次ajax请求了。能通过模拟的方式实现
打开App,查看更多内容
随时随地看视频慕课网APP