var bookRate = new Array('The Right to differ', 'Issues In Contemporary Documentary', 'Writing, Directing and Producing', 'Lee Kuan Yew My Lifelong Challenge');
var selection = document.rate.checkbox;
var sum = 0.00 ;
for (i=0; i<selection.length; i++)
if (selection[i].checked == true)
alert('Book Name : ' + bookRate[i] + ' \n Price of the book : ' + selection[i].value )
alert('Total Purchased Books : ' + selection[i].value );
これは私が今持っているものです。
2 つのチェックボックスがオンになっている場合、合計する方法を知る必要がありますか?
この関数は、選択したアイテムのみを表示します。