js获取id号和class类名的区别原生JS通过id和class获取元素是用,document.getElementById(IDname),document.getElementsByClassName('ClassName')兼容性:ID兼容,clas2023-03-11JavaScript390