0
如果有這個jQuery腳本將文件從ftp服務器1移動到ftp服務器2.它確實有效,但我想要一個一個移動文件,而不是一次全部移動。無嚴寒與瀏覽器的「異步=假」 ..jquery等待Ajax調用完成
<script>
var files = new Array();
files[1]="testfile1.txt";
files[2]="testfile2.txt";
files[3]="testfile3.txt";
$('#button').click(function() {
$.each(files, function(key, value) {
jQuery.ajax({
url: '/move.php',
method: 'GET',
data: {
file: value
},
success: function(data) {
$('#'+ key).html(data);
}
})
});
});
</script>