在ajax 當中,我們可以用 xhr.abort() 來取消一個請求,最簡單的方法就是 setTimeout(() => xhr.abort(), ... fetch('/not-exist-api-path') .then(console.log) // 會 ...
確定! 回上一頁