Files
notes_estom/JavaScript/Ajax/1 ajax.md
2024-01-13 17:25:31 +08:00

23 lines
762 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## 1 基础
### 简介
AJAX = Asynchronous JavaScript and XML异步的 JavaScript 和 XML
AJAX 不是新的编程语言,而是一种使用现有标准的新方法。
AJAX 最大的优点是在不重新加载整个页面的情况下,可以与服务器交换数据并更新部分网页内容。
AJAX 不需要任何浏览器插件但需要用户允许JavaScript在浏览器上执行。
### 原理
异步的JavaScript和XML。创建快速动态网页技术。在后台与服务器进行少量的数据交换实现网页的异步更新。
* 使用JS创建XMLHTTPRequest对象发送HTTPRequest内容。
* 使用JS处理被返回的数据更新页面内容。
### ajax的多种实现方式
![1705132223204](image/1705132223204.png)