问候我在下面有一个jquery加载函数,效果很好。我想在现有按钮中添加ajaxStart函数以显示加载进度。这是我的代码如下。请给我任何建议。谢谢。 这是当前正在运行的jquery部分和按钮:
<script type="text/javascript">
function loadQueryResults() {
$("#mydiv").load($("#region").val()+"commands.html");
return false;
}
</script>
答案 0 :(得分:0)
你可以通过ajax调用改变加载方法:
$.ajax({
url:$("#region").val()+"commands.html",
type :"Get",
dataType:"Html",
beforeSend:function(){
// show loading
}
}).success(function(data){
// hide loading
$("#mydiv").html(data);
});