first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
var tltle1 = document.querySelectorAll(".tltle li")//获取所有tltle 里的li标签
console.log(tltle1)//打印所有li标签
tltle1.forEach(function (v,i) {//循环函数 (这个v和i的概念)
v.onclick = function () {//循环点击
tltle1.forEach(function (item,ac) {//循环清空函数名
item.className = ""
content1[ac].className = " "
})
v.className = "col"//添加函数名
console.log(content1[i]);//tltle1的数组对应content的下标
content1[i].className="active"
}
}
)
var content1 = document.querySelectorAll(".content li")//获取所有content 里的li标签