Array.from(document.querySelectorAll('[id^="m"]')).forEach(function (element) { element.style.visibility = "hidden"; });