1.第一种设置xhr的向应格式为json xhr.responseType = 'json'
2.第二种解析字符串
let data = JSON.parse(xhr.response)
console.log(data);
menu.innerText = data.name
解决Ajax ie缓存机制,请求地址url 添加一个时间戳的参数
1.第一种设置xhr的向应格式为json xhr.responseType = 'json'
2.第二种解析字符串
let data = JSON.parse(xhr.response)
console.log(data);
menu.innerText = data.name
解决Ajax ie缓存机制,请求地址url 添加一个时间戳的参数