当前位置: 移动技术网 > IT编程>网页制作>CSS > 当ajax都完成后执行方法

当ajax都完成后执行方法

2019年07月09日  | 移动技术网IT编程  | 我要评论

<!doctype html>
<html>

<head>
<meta charset="utf-8">
<title></title>
</head>

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

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

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

</html>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网