function show() { var elements = document.getElementsByTagName("DIV"); for(var i = 0, leng = elements.length; i < leng; i++) { elements[i].style.display = "block"; } }