http://www.w3pop.com/learn/view/p/1/o//doc/ajax_browsers/
AJAX applications can only run in web browsers with XML support.
AJAX应用程序只可以在支持XML的浏览器上运行
AJAX Browser Support
浏览器对AJAX的支持
AJAX applications can only run in web browsers with complete XML support.
AJAX只能运行在那些完全支持XML的浏览器上
Only two web browsers available today - Internet Explorer (IE) and Mozilla Firefox.- have complete enough support for XML to run AJAX applications.
目前只有两个浏览器是符合这个要求的 - IE和火狐 - 它们对XML的支持足以运行AJAX程序
Since other browsers like Safari and Opera have limited, incomplete or incorrect XML support, this tutorial will focus on IE and Firefox examples.
其它浏览器在此方面有局限性(比如Safari 和 Opera),所以它们对XML的支持还不完全,这个教程会主要针对IE和FF浏览器进行举例
The example on the previous page called a function called GetXmlHttpObject.
上一页的举例调用了名为GetXmlHttpObject的函数
The purpose of the function is to solve the problem of creating different XMPHTTP objects for different browsers.
使用这个函数的目的是为了解决针对不同浏览器建立不同的XMPHTTP对象而设计的。
The function is listed below:
函数是这样的:
function GetXmlHttpObject(handler) |
完整的代码
The full source code to the example is listed in the next chapter.
举例的完整代码在下一篇中。
AJAX Example - AJAX Source
AJAX 实例 - AJAX 源码
The source code below belongs to the AJAX example on the previous pages.
下面的源代码是前一个页面的。
You can copy and paste it, and try it yourself.
你可以将它复制并粘贴,自己来尝试。
The AJAX HTML Page
AJAX HTML页面
This is the HTML page. It contains a simple HTML form and a link to a JavaScript.
这是一个HTML网页。它包括了一个简单的HTML表单和关联JS的link
<html> <body> <form> <p>Suggestions: <span id="txtHint"></span></p> </body> |
The JavaScript code is listed below.
JS代码在下面
The AJAX JavaScript
AJAX 的 JS
This is the JavaScript code, stored in the file "clienthint.js":
这是JS代码,被保存在"clienthint.js"文件中
var xmlHttp |
The AJAX server page is explained in the next chapter.
有关AJAX服务器端页面的解释放在下一篇中。