我正在使用 jQuery 和 Ajax。
我的 MainFile 有以下代码:
<html>
<head>
<script src="Myscript.js">
</script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: 'POST',
url: 'ajax.php',
success: function(data){
$("#response").html(data);
}
});
});
</script>
<body>
<div id="response">
</div>
</body>
</html>
我的 ajax.php 获取示例数据
...
MyScript.js has the following
function display (text,corner)
{
}
..
我有 Myscript.js。在此,我有一个名为display(text,corner)
. 我必须在执行 ajax.php 后调用这个函数。
我如何在 jQuery 中为上述代码执行此操作?
是否可以在 ajax.php 之后决定执行顺序并调用display(text,corner)
?