我需要檢測我的瀏覽器處於等待狀態或繁忙狀態使用Jquery並實現一個加載程序也。我已經使用的代碼如下如何檢測我的瀏覽器繁忙或等待狀態使用jquery
<script type="text/javascript" src="/assets/script/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
$(function() {
$.ajax({
type: "GET",
url: "sync_bills.php",
success: function(resp) {
$("#results").html(resp);
}
});
});
</script>
<div id="results"><img src="images/loading.gif" width="16" height="16" alt="Loading..." /></div>
ahm你會發現什麼?可能是異步和同步機制可能是你的查詢提示 – donald123
提供的代碼有什麼問題?預期的行爲是什麼?請你能詳細闡述一下嗎? – fcalderan