checkbox radio 一个控件和多个控件是不一样的。需要判断的。
给你一个校验函数,不知道你能看明白否?function CheckCheckbox(val,msg1,msg2)
{
    var is_radio=document.forms[0].elements[val];
    var s_msg1=(msg1==null || msg1=="")? "请选择CheckBox!":msg1;
    var s_msg2=(msg2==null || msg2=="")? "没有可选的CheckBox!":msg2;    if(is_radio)
    {
         if (document.forms[0].elements[val].value != null)
         {
            if (document.forms[0].elements[val].checked)
            {
                return true;
            }
            else
            {
                alert(s_msg1);
                return false;
            }
         }
         else
         {
            var check_length = document.forms[0].elements[val].length;
            var i_count=0
            for(var i=0;i<check_length;i++)
            {
                if (document.forms[0].elements[val](i).checked)
                {
                    i_count=i_count+1;
                    return true;
                }
            }
            if(i_count==0)
            {
                alert(s_msg1);
                return false;
            }
         }
    }//
    else
    {
        alert(s_msg2);
        return false;
    }}
function CheckRadio(val,msg1,msg2)
{
    var is_radio=document.forms[0].elements[val];
    var s_msg1=(msg1==null || msg1=="")? "请选择 radio!":msg1;
    var s_msg2=(msg2==null || msg2=="")? "没有可选的 radio!":msg2;    if(is_radio)
    {
         if (document.forms[0].elements[val].value != null)
         {
            if (document.forms[0].elements[val].checked)
            {
                return true;
            }
            else
            {
                alert(s_msg1);
                return false;
            }
         }
         else
         {
            var check_length = document.forms[0].elements[val].length;
            var i_count=0
            for(var i=0;i<check_length;i++)
            {
                if (document.forms[0].elements[val](i).checked)
                {
                    i_count=i_count+1;
                    return true;
                }
            }
            if(i_count==0)
            {
                alert(s_msg1);
                return false;
            }
         }
    }//
    else
    {
        alert(s_msg2);
        return false;
    }}

解决方案 »

  1.   

    帮你改了
    <html>
    <head>
    <TITLE></TITLE>
    <script language="javascript">
    //**********选择条件的控制**********
    function CheckOne(obj) {
    if(obj.value!=null)
    {
    if(obj.checked) return true;
    else return false;
    }
    else
    {
    for(i=0;i<obj.length;i++) {
    if(obj[i].checked) return true;
    }
    return false;
    }
     }
    function SeleTrader() {
      if(!CheckOne(document.form1.xg)) {
       document.execCommand("Stop");
        alert('请选择[商家]');
       return false;
       }
    return true;
    }
    //**********结束**********
    //**********变色的处理**********
    var color="";
    function mover(obj)
    {
        color = obj.style.backgroundColor;

        if(color!="#FFF4D7")
    {
      obj.style.backgroundColor = "#ECF0F9";
    }
    else
    {
    obj.style.backgroundColor = "#EEFFE6";     
    }
    }
    function mout(obj)
    {
       obj.style.backgroundColor = color;
    }
    function checkbox(obj)
    {
       var ob = obj.parentElement.parentElement;
       if(obj.checked)
       {
          ob.style.backgroundColor="#FFF4D7";
      color="#FFF4D7"
       }
       else
       {
      ob.style.backgroundColor = "";
          color="";
       }
    }
    //**********结束**********
    //-->
    </script>
    <script src="Include/pageCheck.js"></script>
    </head>
    <body onload="form1.reset()">
    <form name="form1" method="post" action="savetrader_modi.asp"  onsubmit='return SeleTrader()' >
      <table width="769" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#E6E6E6">
        <tr onmouseover="mover(this)" onmouseout="mout(this)">     
          <td width="34"><input type="checkbox" name="xg" value="1897"  onClick="checkbox(this)" ></td>
          <td width="58" >1897</td>
          <td width="267">新浪潮</td>
          <td width="153">新浪潮</td>
          <td width="118">12345467</td>
          <td width="66">***</td>
          <td width="44">0</td>
        </tr>
    <tr onmouseover="mover(this)" onmouseout="mout(this)">     
          <td width="34"><input type="checkbox" name="xg" value="1897"  onClick="checkbox(this)" ></td>
          <td width="58" >1897</td>
          <td width="267">新浪潮</td>
          <td width="153">新浪潮</td>
          <td width="118">12345467</td>
          <td width="66">***</td>
          <td width="44">0</td>
        </tr>
        <tr onmouseover="mover(this)" onmouseout="mout(this)"> 
          <td colspan="7" align="center"><input name="submit" type="submit" value="删除"  onClick="return confirm('确定要删除吗?')" > 
            <input name="submit" type="submit" value="修改"> <input type="reset" name="Submit4" value="重置"> 
          </td>
        </tr>
      </table>
      </form>
    </body>
    </html>
      

  2.   

    我说一点变色部分obj.style.backgroundColor
    1、请确定backgroundColor 的大小写;
    2、backgroundColor 属性应该是obj.style.backgroundColor 还是obj.backgroundColor 
    请确认。