mirror of
https://gitlab.com/nekoya/web.git
synced 2024-11-29 19:52:39 +01:00
19 lines
445 B
JavaScript
19 lines
445 B
JavaScript
|
function add(id) {
|
||
|
var inputCount = document.getElementById(id);
|
||
|
console.log("I got clicked");
|
||
|
if (inputCount.value < 9) {
|
||
|
inputCount.value++;
|
||
|
} else {
|
||
|
alert("MAX product reach");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function minus(id) {
|
||
|
var inputCount = document.getElementById(id);
|
||
|
console.log("Minus got clicked");
|
||
|
if (inputCount.value > 1) {
|
||
|
inputCount.value--;
|
||
|
} else {
|
||
|
alert("Remove this item");
|
||
|
}
|
||
|
}
|