dynamically change data in table

hi, i have a table with some data and in that table i have two column. quantity and total. i want to enter the quantity in the table and total should be updated as soon as the quantity value changes.
can anyone tell me how to do it?