求解答!!关于load()方法异步请求数据后,弹出窗口提示
想点击按钮后,继加载完内容之后,弹出窗口。但写在回调函数之后 。点击按钮却是先弹出窗口 ,再加载数据。 哪出了问题??
$(function(){
$("#btnShow").bind("click" , function(){
$("ul")
.html("<img src='Images/Loading.gif' alt=''/>")
.load("http://www.imooc.com/data/fruit_part.html",function() {
$(this).attr("disabled", "true");
alert("执行结束")
})
})
})