Skip to content
Advertisement

how to set value to specific object of array object in javasript

I have to write inputbox inner a looping statement. let say I have 3 times loop

JavaScript

the question is, how to set every value I type in inputbox only settbthe result inner span from its row index only

Advertisement

Answer

You might have more luck trying an approach like this. Remove the ID attributes from the elements – you can replace with class names if you like or remove entirely from the span element as it should not necessarily be required to allow you to target it programmatically. If you use sibling selectors you can use the target attribtute of the event ( in this case keyup within the number element ) and then traverse the DOM to find the span…

JavaScript

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