Skip to content
Advertisement

How to get the sum of values for inputs Tags that change dynamically (number of inputs change dynamically according to number of days in a month)? [closed]

I’m trying to calculate the sum of values inputted (the number of inputs change dynamically)

This is the function that returns the number of inputs:

JavaScript

This is my component return

JavaScript

And this is the function that’s supposed to return the sum of values inputted from the user:

JavaScript

I’m trying to return the sum of all Inputed values In the Inputs who had id=”total” but It returns nothing ,also when I’m using console.log(totalOfInps) It shows nothing in the console,how I can get the sum of all Input values ?

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement