js中 fetch请求,以及随机数

Posted 几许风雨

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了js中 fetch请求,以及随机数相关的知识,希望对你有一定的参考价值。

fetch

var url=‘https:----------;
            var opt={
                method:"GET",
                credentials: ‘include‘
            };
fetch(url,opt).then(response => response.json())
            .then(data => {})

random:

 random_time=(Math.random()*(0.5-1.3) + 1.3).toFixed(2);

以上是关于js中 fetch请求,以及随机数的主要内容,如果未能解决你的问题,请参考以下文章