次のようなhtmlテーブルがあります。
Invoice# Due Date Balance Select
12345 12/25/2011 $1,356.00 X
56789 12/30/2011 $1,000.00 X
Total: $2,356.00
テーブルの下にテキストボックスがあります。行のチェックボックスが選択または選択解除されたときに、テキストボックスの値を更新して、選択した行の残高を加算または減算します。つまり、チェックボックスがオフの場合は行に記載されている残高を減算し、チェックすると追加します. デフォルトでは、ボックスはチェックされています。