number spinner

[Javascript] number spinner부제 : 버튼 꾹 누르면 숫자 계속 증가/감소하는 기능 구현 up down var timerInterval; var num = document.getElementById("num"); // 숫자 input box // 버튼 눌렀을 때 function mousedown(el) { timerInterval = setInterval(function () { if (el.id === "up") { // up button num.value = parseInt(num.value) + 1; } else if (el.id === "down") { // down button num.value = parseInt(num.value) - 1; } }, 100); } // 버튼..
S0PH1A
'number spinner' 태그의 글 목록