JS - 把类似document.querySelectorAll(".xxx")、document.getElementsByName("xxx")这种方法的返回结果转换成数组对象
var btns = document.querySelectorAll(".btn");
console.log(btns instanceof Array); // false
btns = Array.prototype.slice.call(btns, 0);
console.log(btns instanceof Array); // true