摘要:
function getDateFormat(str) { return str.split('').join('-') .replace("年", "yyyy") .replace("月", "MM") .replace("日", "dd") .replace("时", "HH") .replac 阅读全文
摘要:
const { myInterval, clearMyInterval } = (function(){ // 存放系统中的定时器id let timerIdMap = { num: 0 } function myInterval(callback, interval) { // 每设置一次定时器, 阅读全文
摘要:
function runTimer(list = [ { delay:2000, text:'第一步延迟2s' }, { delay:3000, text:'第二步延迟3s' }, { delay:1000, text:'第三步延迟1s' }, ], cb = (text)=>{ console.l 阅读全文
摘要:
const getNetTime = () => { return new Promise((resolve, reject)=> { var xhr = new XMLHttpRequest(); if( !xhr ){ xhr = new ActiveXObject("Microsoft.XML 阅读全文