AJAX Basic

AJAX基础

AJAX HOME
AJAX首页
AJAX Intro
AJAX简介
AJAX Request
AJAX请求
AJAX Example
AJAX实例
AJAX Browsers
AJAX浏览器
AJAX XMLHttpRequest
AJAX XMLHttpRequest对象
AJAX Server
AJAX服务器端
AJAX Server Script
AJAX服务器脚本

AJAX Advanced

AJAX高阶

AJAX Suggest
AJAX建议
AJAX Source
AJAX源码
AJAX Database
AJAX数据库
AJAX XML File
AJAX XML文件
AJAX ResponseXML
AJAX响应XML

AJAX Examples

AJAX范例

AJAX Examples
AJAX范例

AJAX Example

AJAX实例

 

Previous Next

Your first AJAX application

您的第一个AJAX应用程序

To understand how AJAX works, we will create a small AJAX application.

我们将创建一个小的AJAX应用程序,以让您明白AJAX是如何工作的。

First we are going to create a standard HTML form with two input fields: Name and Time. The "Name" field will be filled out by the user, and the "Time" field will be filled out with AJAX.

首先我们创建一个基础的HTML表单,它带有两个输入框:姓名和时间。姓名字段将有用户填写,同时时间字段将由AJAX技术自动填写。

The HTML file will be named "testAjax.htm", and it looks like this (notice that the HTML form below has no submit button!):

我们把这个HTML文件命名为:testAjax.htm,它的样式是这样(请注意这个HTML表单没有提交按钮):

 

<!--文件名:testAjax.htm-->

<html>
<body>

<form name="myForm">
Name: <input type="text" name="username" />
Time: <input type="text" name="time" />
</form>

</body>
</html>

The next chapters will explain the keystones of AJAX.

下一章节我们将解释AJAX技术核心的基石。


Previous Next