搜索结果
查询Tags标签: responseText,共有 5条记录-
Js 函数eval() 用法记录
js 函数eval() 用法记录问题描述:遇到一串数据responseText,在浏览器中使用console函数输出responseText这个字段整体的时候,eg:console.log(“—————–responseText —-“+responseText); 时在控制台可以看到数据如下,————-responseText———– {“MSG”:”…
2022/8/27 23:35:29 人评论 次浏览 -
Ajax使用步骤
JavaScript编写AJax代码创建XMLHttpRequest对象,用于和服务器交换数据 向服务器发送请求 获取服务器响应数据var xmlhttp; if (window.XMLHttpRequest) {// IE7+, FireFox, Chromexmlhttp = new XMLHttpRequest(); } else {// IE5,IE6xmlhttp = new ActiveXObject("…
2022/3/28 23:53:12 人评论 次浏览 -
ajax的创建
let xhr=new XMLHttpRequest()//初始化console.log(xhr.readyState)//ajax对象的状态//基础配置xhr.open("get","https://www.baidu.com")//发送请求xhr.send(null)//ajax 对象准备状态变化的时候会执行函数xhr.onreadystatechange=function(){if(xhr…
2021/11/11 23:41:43 人评论 次浏览 -
ajax的创建
let xhr=new XMLHttpRequest()//初始化console.log(xhr.readyState)//ajax对象的状态//基础配置xhr.open("get","https://www.baidu.com")//发送请求xhr.send(null)//ajax 对象准备状态变化的时候会执行函数xhr.onreadystatechange=function(){if(xhr…
2021/11/11 23:41:43 人评论 次浏览 -
axios在IE9环境下报错Unhandled promise rejection TypeError: 无法获取未定义或 null 引用的属性“result“
原文链接 官方给的解释是:XMLHttpRequest.response只支持IE10+(https://msdn.microsoft.com/en-us/library/hh872881(v=vs.85).aspx)。 原因就清楚了,IE8-9没有这个字段,所以axios中的response.data赋值时就为undefined。 这个问题在2016年被提出,2019年8月被关闭了…
2021/5/18 10:55:40 人评论 次浏览