/*
<form action="" method="post" name="form1">
<input type="checkbox" name="writer" value="10" οnclick="CheckSum()">橡皮10元<br>
<input type="checkbox" name="writer" value="20" οnclick="CheckSum()">铅笔20元<br>
<input type="checkbox" name="writer" value="30" οnclick="CheckSum()">订书机30元<br>
<input type="checkbox" name="writer" value="40" οnclick="CheckSum()">打孔机40元<br>
<input type="checkbox" name="writer" value="50" οnclick="CheckSum()">记事薄50元<br>
总价为:<span id="sumprice">0</span>元
</form>
<script language="javascript">
function CheckSum()
{
var sum = 0;
for(var i=0;i<document.form1.elements["writer"].length;i++)
{
if(document.form1.elements["writer"][i].checked)
{
sum = sum+parseInt(document.form1.elements["writer"][i].value);
}
}
sumprice.innerText = sum;
}
</script>
*/