日期:2014-05-17 浏览次数:20879 次
<SCRIPT LANGUAGE="JavaScript"> var form_total=0; function CheckChoice(whichbox) { if (whichbox.checked == false) { form_total -= eval(whichbox.value); } else { form_total += eval(whichbox.value); } document.myform.total.value = eval(form_total)+'分'; } function InitForm() { document.getElementById(ad).total.value='0'; for (xx=0; xx < document.getElementById(ad).elements.length; xx++) { if (document.getElementById(ad).elements[xx].type == 'checkbox') { document.getElementById(ad).elements[xx].checked = false; } } } </script> <tr id="ad"> <td>您的积分还有<%=fen%>个</td> <td> <input name='bold' type='checkbox' id='bold' value='100' onclick="CheckChoice(this);">加粗 <input name='top' type='checkbox' id='top' value='200' onclick="CheckChoice(this);">固顶<br /> 总计:<input type="text" name="total" readonly onFocus="this.blur();" style="border:none;" value="0分"> </td> </tr>