【发布时间】:2008-12-25 09:07:47
【问题描述】:
我正在使用 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)?
【问题讨论】:
标签: javascript jquery ajax function-calls