摘要: 第一种:发送get请求。 var xhr = new XMLHttpRequest(); xhr.open('GET',url);//url为请求地址 xhr.responseType = 'json'; xhr.onload = function () { // 请求结束后,在此处写处理代码 }; 阅读全文
posted @ 2021-06-03 15:08 饮木 阅读(730) 评论(0) 推荐(0) 编辑
摘要: Number(value).toFixed(3) 阅读全文
posted @ 2021-06-03 15:03 饮木 阅读(1425) 评论(0) 推荐(0) 编辑
摘要: 注:该方法只能进行数值左侧补0,不能补充其他符号。 第一种: int youNumber = 1; // 0 代表前面补充0 // 3 代表长度为3 // d 代表参数为正数型 String str = String.format("%03d", youNumber); System.out.pri 阅读全文
posted @ 2021-06-03 14:58 饮木 阅读(1497) 评论(0) 推荐(0) 编辑