当我使用集合的fetch()方法获取结果时,如何在backbone js中获取响应代码?我知道当响应代码像4xx时,它会执行错误回调函数,当响应代码像2xx时,它会执行成功回调方法。var x = user.fetch({ alert('Error on fetch')console.log(xhr.respons
我正在尝试从前端访问API,并且尝试了xhr和fetch api请求。在使用fetch时,我收到错误消息"Response to present not pass access control check: No ' access -Control-Allow- Origin“我不太理解CORS,但我的理解是,我请求的