var arr = [1, 2, 3, 4, 5] arr.sort(function () { return Math.random() - 0.5 })
优点:简单快捷,缺点:不够随机
参考地址open in new window
视频大文件上传 新建带有默认值的数组