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 );
这就是我现在所拥有的。
如果选中了两个复选框,我需要知道如何总计?
此功能将仅显示所选项目。