rudimentary form
This commit is contained in:
parent
eab2134685
commit
b86f7f6ea0
7 changed files with 121 additions and 23 deletions
14
js/order.js
Normal file
14
js/order.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue