mirror of
https://gitlab.com/nekoya/web.git
synced 2024-12-23 06:50:30 +01:00
19 lines
No EOL
445 B
JavaScript
19 lines
No EOL
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");
|
|
}
|
|
} |