You can add an Input element and set it to type Number it may be what you want (and that’s the easiest solution.
But if you wish to do it with numbers that’s possible as well.
Add the button elements to the page + a text element.
and use this code:
let value = 0; //or any other initial number.
const showVal = () => $w("#valueText").text = value.ToString();
$w.onReady(() => {
showVal();
$w("#plusButton, #minusButton, #multiplyButton").onClick(event => {
const target= event.target.id;
switch(target){
case "plusButton":
value++;
break;
case "minusButton":
value--;
break;
case "multiplyButton":
//do what you want
break;
}
showVal();
})
})
[fixed]