<div class="col">1</div>
<div class="col">2</div>
<div class="col">3</div>
<div class="rez">Rezult 1</div>
<div class="rez">Rezult 2</div>
<div class="rez">Rezult 3</div>
<script>
var elements = document.querySelectorAll('div.col'),
result = document.querySelectorAll('div.rez');
[].forEach.call(elements, function (el, i) {
el.onclick = function () {
result[i].style.background = "red";
alert(i);
}
});
</script>