how to update the page without refresh

后端 未结 4 1471
旧巷少年郎
旧巷少年郎 2021-01-17 04:22

In Gmail when a new email is received, the page automaticly show the mail without refreshing, how this can be done?

4条回答
  •  长情又很酷
    2021-01-17 05:00

    You said it AJAX XMLHTTPRequest search for jQuery and ajax on the wiki, it's not sow tough stuff nowadays as it was 4-5 years ago, when we were using hidden iframes to simulate desktop application behaviour online.

    This is a point to start: http://api.jquery.com/jQuery.ajax/

    And this is the main idea: http://www.w3.org/TR/XMLHttpRequest/

提交回复
热议问题