Files
ClassContent/历届学生/韩想/每日课程/2020-08-17/笔记.txt
2024-09-27 02:06:13 +08:00

37 lines
783 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.

ajax 是一种无刷新的前后端数据交互的方式
后端渲染
后端:页面 + 功能 + 数据dba + 安全 + 服务器(运维)
前端:页面
前端分离
后端:使用任意后端语言实现接口
数据
前端:使用任意框架实现页面和功能
页面+功能
前端 --ajax--> 后端
ajax 跨域
解决ajax跨域
作业明天晚上上课告诉我ajax跨域是什么大致有哪些解决办法
ajax跨域 浏览器拦截导致的!
1: js <== jsonp 注意它不是ajax请求是js资源文件请求
2: cors(Access-Control-Allow-Origin) 后端设置的,和前端无关
3服务端代理
A(自己前端) ==跨域===> C(别人后端)
A(自己前端) =====> B(自己后端)
B(自己后端) =====> C(别人后端)