<script type="text/javascript">
window.onload = function () {
var elements = document.getElementsByClassName('a');
for (i = 0; i < elements.length; i++) {
elements[i].style.display = 'none';
}
}
</script>
<div class="a">ddd</div>
<div class="a">bv</div>
<div class="a">ddcd</div>
<div class="a">ddssad</div>