日期:2014-05-17  浏览次数:20715 次

大神来看看。 复选框问题
本帖最后由 zhouk0619 于 2013-12-05 18:07:05 编辑
<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <script type="text/javascript">
function aa()
{
var fxcb_v=document.getElementsByName("FXCB"); 
var hj=document.getElementById("FXCBFZ"); 
  if(fxcb_v[0].checked==true)
{
var bb= parseInt(fxcb_v[0].value.substr(fxcb_v[0].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(bb);
}else if(fxcb_v[0].checked==false)
{
var bb= parseInt(fxcb_v[0].value.substr(fxcb_v[0].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(bb);
}else if(fxcb_v[1].checked==true)
{
var cc= parseInt(fxcb_v[1].value.substr(fxcb_v[1].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(cc);
}else if(fxcb_v[1].checked==false)
{
var cc= parseInt(fxcb_v[1].value.substr(fxcb_v[1].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(cc);
}else if(fxcb_v[2].checked==true)
{
var dd= parseInt(fxcb_v[2].value.substr(fxcb_v[2].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(dd);
}else if(fxcb_v[2].checked==false)
{
var dd= parseInt(fxcb_v[2].value.substr(fxcb_v[2].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(dd);
}else if(fxcb_v[3].checked==true)
{
var ee= parseInt(fxcb_v[3].value.substr(fxcb_v[3].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(ee);
}else if(fxcb_v[3].checked==false)
{
var ee= parseInt(fxcb_v[3].value.substr(fxcb_v[3].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(ee);
}else if(fxcb_v[4].checked==true)
{
var ff= parseInt(fxcb_v[4].value.substr(fxcb_v[4].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(ff);
}else if(fxcb_v[4].checked==false)
{
var ff= parseInt(fxcb_v[4].value.substr(fxcb_v[4].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(ff);
}else if(fxcb_v[5].checked==true)
{
var gg= parseInt(fxcb_v[5].value.substr(fxcb_v[5].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(gg);
}else if(fxcb_v[5].checked==false)
{
var gg= parseInt(fxcb_v[5].value.substr(fxcb_v[5].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(gg);
}else if(fxcb_v[6].checked==true)
{
var hh= parseInt(fxcb_v[6].value.substr(fxcb_v[6].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(hh);
}else if(fxcb_v[6].checked==false)
{
var hh= parseInt(fxcb_v[6].value.substr(fxcb_v[6].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(hh);
}else if(fxcb_v[7].checked==true)
{
var ii= parseInt(fxcb_v[7].value.substr(fxcb_v[7].value.length-7,1));
hj.value=parseInt(hj.value)+parseInt(ii);
}else if(fxcb_v[7].checked==false)
{
var ii= parseInt(fxcb_v[7].value.substr(fxcb_v[7].value.length-7,1));
hj.value=parseInt(hj.value)-parseInt(ii);
}else if(fxcb_v[8].checked==true)
{
var jj= parseInt(fxcb_v[8].value.substr(fxcb_v[8].value.length-7,1));
hj.value=parseInt(hj.value)+par