// 只需要设置关闭异常,即可完美解决 function test(){ var add_unid=0; $.ajax({ type : "post", url : "test.php", data : { }, async : false, success : function(data){ if(data.status){ add_unid = data.info; } } }); console.log('world'); return add_unid; }
ajax中return不能成功返回值
最新推荐文章于 2020-05-06 18:16:50 发布