How does one add more than one variable such as bloque01, bloque02, and bloque03 to script?
The below script works nicely for one variable (bloque01) to toggle its visibility, and it is invoked by clicking a button. I put “LT” in place of “<” and “GT” in place of “>” so the script is visible here in the forum (otherwise it disappears).
function myFunction() {
document.getElementById("bloque01").style.display = "default";
}
Intuitively to add three variables, the code would be something like the following, but it appears to be bad syntax.
function myFunction() {
document.getElementById("bloque01", "bloque02", "bloque03).style.display = "default";
}
Could someone please provide the correct syntax for the second example.