fetch的使用

        fetch('./00 data.json')
            .then(function (response){
                //resolve
                console.log(response)
                return response.json();
               
            })
            .then(function (data) {
                console.log(data);
            }).catch(function(){
                //reject
            });
posted @ 2021-11-23 09:49  六月沉  阅读(39)  评论(0)    收藏  举报