正文

JavaScript原生获取元素class的方法有多种,以下是一些常用的方法: 1. 使用`getElementsByClassName`方法: ```javascript var elements =