<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml"> <pead> <meta http-equiv =" content-Type "content =" text/html; charset = gb2312 "/> <title> untitled document </title> </pead> <body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Here, I reference this code not because it is convenient for me to call it later, but because I have discovered some methods that I have never used.
GetElementsByClassName has three parameters, but you do not need to input three parameters when calling it. You only need to input the first parameter. The other two parameters have default values.
The parameters of the original javascript function can be set by default, which I have never known.