<head>
    <script>
        window.onload = init;

        function init() {
            var pole = document.querySelectorAll('input[type=range]');
            for (var i = 0; i < pole.length; i++) {
                pole[i].addEventListener('input', zmenaHodnoty);
            }
        }

        function zmenaHodnoty() {
            var vystup = document.querySelector('output[for=' + this.id + ']');
            vystup.innerText = this.value;
        }
    </script>
</head>