ajax返回的值被方法外取到

xiaoxiao2021-02-27  429

其实很简单的。

$.ajax({ url:sys_ctx+'/newmenu/default.do?method=count', async:false, // 同步请求 success:function(json){ console.info(json.count.length);  加上 async:false  就能在方法外面取到值了。

转载请注明原文地址: https://www.6miu.com/read-4602.html

最新回复(0)