码迷,mamicode.com
首页 > Web开发 > 详细

js中 fetch请求,以及随机数

时间:2020-05-19 21:04:50      阅读:80      评论:0      收藏:0      [点我收藏+]

标签:eth   etc   https   json   clu   on()   请求   ons   random   

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请求,以及随机数

标签:eth   etc   https   json   clu   on()   请求   ons   random   

原文地址:https://www.cnblogs.com/jxfy/p/12919010.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!