<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script>
const btnList = document.querySelectorAll("button")
//ES6
const l1 = Array.from(btnList)
//ES6
const l2 = [...btnList]
//ES6
const l3 = [].slice.call(btnList)
const l4 = Array.prototype.slice.call(btnList)
//ES6
const l5 = [].slice.apply(btnList)
const l6 = Array.prototype.slice.apply(btnList)
const l7 = []
for(let i = 0; i < btnList.length; i++){
l7.push(btnList[i])
}
</script>
</body>
</html>
js伪数组转真数组
最新推荐文章于 2025-10-05 08:45:00 发布
299

被折叠的 条评论
为什么被折叠?



