you can write your javascript code like this -
onclick of the button find the immediate parent tr of the button then find a child input of that tr and then increment value.
in this way you can increment the value of input exactly in same row. I am not comfortable with javascript so i can give you code sample although in jquery i can easily do it, but it won't help.
You can write your increase function like i said