front-end-interview-handbook/packages/quiz/questions/explain-ajax-in-as-much-det.../zh-CN.mdx

8 lines
678 B
Plaintext
Raw 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.

---
title: 尽可能详细地解释Ajax
---
Ajax (异步 JavaScript 和 XML) 是一套网络开发技术,在客户端使用许多网络技术创建异步 Web 应用程序。 使用 Ajax Web 应用程序可以将数据异步地发送到服务器(后端)并从服务器上检索,而不干扰现有页面的显示和行为。 通过将数据交换层与表现层解耦Ajax 允许网页,以及扩展的 Web 应用程序,动态地改变内容,而不需要重新加载整个页面。 实际上,现代实现通常使用 JSON 而不是 XML因为 JSON 是 JavaScript 的原生优势。
`XMLHttpRequest` API 或如今的 `fetch` API 经常用于异步通信。