ajax
Kevin11Yao
这个作者很懒,什么都没留下…
展开
-
AJAX-POST设置请求体
AJAX发送请求 //1.创建对象 const xhr = new XMLHttpRequest(); //2.初始化 设置类型与 URL xhr.open('POST','http://127.0.0.1:8000/server'); //3.发送 xhr.send(); xhr.onreadystatechange = function(){ //判断 ..... //ex if(xhr.readyState === 4) //if(xhr.status>=200 &&原创 2021-05-14 19:58:03 · 394 阅读 · 0 评论 -
AJAX特点
AJAX的特点 优点 可以无需刷新页面与服务器端进行通信 允许你根据用户时间来更新部分页面的内容 缺点 没有浏览历史,不能回退 存在跨域问题(同源) SEO(搜索引擎优化)不友好原创 2021-05-14 14:45:20 · 78 阅读 · 0 评论