php+jquery+ajax
<script type="text/javascript">
function check(){
$(function(){
$("#getjson").bind("click",function(){
$.ajax({
type: "POST",
url: "/index.php",
data: "name="+$("#username").val(),
success: function(msg){
alert(msg);
此处获得返回值后如何在function check()里return false?
}
});
});
})
}
</script>
------解决方案--------------------
想那么多
<script type="text/javascript">
var ft=false;
//这里执行ajax
$(function(){
//执行成功 ft=true;
})
function check(){
//这里判断ft
}