как вариант:
<form name="form">
    <input type="button" value="up" />
    <b id="b"> 0 </b>
    <input type="button" value="dn" />
<form>
<script>
window.onload = function() {
    var form = document.form.elements, i = form.length, j = 0;
    while(i--) {
        form[i].onclick = function(i) {
            return function() {
                document.getElementById('b').innerHTML = i ? ++j : --j;
            };
        }(i);
    }
};
</script>
допилите сами