[英]Hide bootstrap carousel indicators when there is only one content
首先,您应该为轮播中的图像设置 class 属性,然后使用 getElementsByClassName 将图像保存到数组中,您将获得所有图像。
let myImg = document.getElementsByClassName("your-image-in-carousel") console.log(myImg)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.