問題描述
示例:轉到您的 Facebook 墻,滾動頁面末尾,Facebook 將異步加載更多墻帖.或者只需單擊墻上帖子中的圖像.圖片對話框(帶有評論和更大的圖片)也在異步加載.(您可以使用 firebug 看到 GET 請求).
example: Go to your Facebook wall, scroll the end of the page, Facebook will load more wall posts asynchronously. Or just click on an images in your wall post. The image dialog (with comments and larger image) is loading asynchronously as well. (You can see the GET requests with firebug).
但是通過查看 firefox 選項卡,您會看到加載指示器,就像發生回發時一樣.
But by looking and the firefox tab, you see the loading indicator, just like when a postback occurs.
我知道這可以通過使用 IFrame
并更改其 src 來實現.就像 iGoogle 所做的那樣.但我不確定 Facebook 是否使用 IFrame 來加載額外的墻貼.還有其他方法可以實現嗎?
I know this can be achieved by using an IFrame
and changing its src. Just like what iGoogle does. But I'm not sure if Facebook uses an IFrame to load additional wall posts. Is there another way to achieve this?
更新:通過說加載指示器";我不是說 ajax 指示器.
正如我所提到的,瀏覽器指示器(在標簽的左側顯示頁面是否正在加載)會像回發一樣變為正在加載.
Update: by saying "loading indicator" I did not mean an ajax indicator.
As I mentioned the browser indicator (the one at the laft side of a tab showing us if the page is loading) changes to loading like it is a postback.
推薦答案
不是 AFAIK.我的猜測是他們可能將 IFrame src 設置為 ajax 方法,并在加載時將內容移動到 div(或其他元素).
Not AFAIK. My guess is they probably set the IFrame src to an ajax method and when loaded, they move the content to a div (or another element).
這篇關于在 ajax 調用上顯示 *browser* 加載指示符(如發生回發時)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!