摘要:
function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1) + min) } function shuffle(arr) { let _arr = arr.slice() // 创建一个源数组 阅读全文
posted @ 2020-02-15 11:59
ladybug7
阅读(215)
评论(0)
推荐(0)
摘要:
function addClass(el, className) { if (hasClass(el, className)) { return } let newClass = el.className.split(' ') newClass.push(className) el.classNam 阅读全文
posted @ 2020-02-15 08:54
ladybug7
阅读(1241)
评论(0)
推荐(0)
摘要:
var mode = { 0: 'sequence', 1: 'loop', 2: 'random' } var m = 1 function changeMode() { var newMode = (m + 1) % 3 console.log(mode[newMode]) m++ } chan 阅读全文
posted @ 2020-02-15 08:37
ladybug7
阅读(151)
评论(0)
推荐(0)

浙公网安备 33010602011771号