Help on JavaScript Function

On my Second form page, we added some JavaScript function to add some buttons on input elements:
https://cdn.livechat-static.com/api/file/lc/att/8801096/851b4122ac119d39519e7e4b5d3251de/Screenshot%20%28122%29.png

We followed this link:
https://css-tricks.com/number-increment-buttons/

The buttons were added, but when the + or – button is pressed, the values are not being added/deducted on input. So the total is not update.

Can you help me? Thank you in advance.