HKGalden科技臺
發表文章發起投票
[AJAX基礎教學 - 2]More examples of AJAX
[#FF0000]記住: 你之前要有basic的HTML同JavaScript同XML的知識,最好有埋PHP[/#FF0000]

What is AJAX?
AJAX allows you to communicate with the server while the user is still on the webpage without interrupting their experiences.

======================================================================================================

Example 1:
Original:


As you can see, there is an example above. When the user click a “Email” tab, the entire webpage [#FF0000]does not need to be reloaded[/#FF0000], it [#FF0000]just updates a little section[/#FF0000] right there (black frame).

Updated:


======================================================================================================
======================================================================================================

Example 2:




When you go to www.google.com, say you want to type in “hkgalden” in the search textbox, you can see there are lists of item shown, this is AJAX. It is not stored on your computer. It is actually communicating with the server and when you are typing your query that’s going to the server, it gives new information guessing about what you are going to type in. And whenever has those guesses, it displays them on your webpage. So every time you type in something, [#FF0000]your webpage[/#FF0000], you know, it [#FF0000]isn’t refreshing[/#FF0000]. It [#FF0000]is actually just updating the little small portion[/#FF0000] right after your input box.

Other applications:
Form validation – name suggestion, password check, name duplicate check…

Hopefully, you guys can understand why we need AJAX and why it useful!
In the next tutorial, I will show you how to build up a very simple AJAX program.
[/size=4]
Good0Bad0
2013/07/15, 5:07:37 凌晨
本貼文共有 0 個回覆
此貼文已鎖,將不接受回覆
發表文章發起投票