Use Javascript and the onchange HTML event on the quantity input fields.
When the user changed the quantity, the Javascript can process the form and calculate the new order price. Javascript is able to calculate the total price for a number of items, by using something like this:
item_quantity = document.getElementById('item_quantity').value;
item_price = document.getElementById('item_price').value;
// Perform some chacks here, to see whether the input values are valid
item_total = item_price * item_quantity;
Do this for all your items and add all item_total
values to get the total order price.
By picking handy ids for your price and quantity fields, you can easily loop this and thus be independent of the amount of items in your order.