piekarnikgosipl/js/order.js
2026-11-08 15:40:41 +01:00

14 lines
288 B
JavaScript

function min(a, b) {
if (a > b) {
return a
}
return b
}
function increase(id) {
input = document.getElementById(id)
input.value= min(parseInt(input.value)+1, 0)
}
function decrease(id) {
input = document.getElementById(id)
input.value= min(parseInt(input.value)-1, 0)
}