當ajax都完成後執行方法

<!DOCTYPE html>
<html>php

<head>
<meta charset="UTF-8">
<title></title>
</head>html

<body>
<script src="./jquery.min.js"></script>
<script>
var ajax6 = $.ajax({
url: './res1.php',
type: "post",
success: function(paramResponse) {
//console.log(paramResponse);
alert(paramResponse);
}
});jquery

var ajax7 = $.ajax({
url: './res2.php',
type: "post",
success: function(paramResponse) {
alert(paramResponse);
}
});ajax

$.when(ajax6, ajax7).done(function() {
//所作操做
alert("sss");
});
</script>
</body>post

</html>url

相關文章
相關標籤/搜索