1.getElementsByName() 方法
https://www.w3school.com.cn/jsref/met_doc_getelementsbyname.asp
2.getElementById() 方法
https://www.w3school.com.cn/jsref/met_doc_getelementbyid.asp
3.document.getElementByclassName()方法
https://blog.csdn.net/boat_sea/article/details/80142875
4.querySelector() 方法
document.querySelector("h2, h3").style.backgroundColor = "red";
https://www.runoob.com/jsref/met-document-queryselector.html
document.querySelector和document.getElementByClassName的区别
https://blog.csdn.net/u013718730/article/details/90474272
详解document.getElementById 和 document.querySelector的区别
https://blog.csdn.net/m0_37793545/article/details/79193254
document.getElementById/Name/TagName返回值的小区别
https://www.jianshu.com/p/151c5a283c3e
来源:51CTO
作者:wx5b99db4c10578
链接:https://blog.51cto.com/13968096/2451734