全选,反选按钮组合

< script language = " JavaScript " >


    
function  SetChecked(boxname)  ... {
        f
=document.form1;
    
        
for( i=0 ; i<f.elements.length ; i++...{
            
if (f.elements[i].name==boxname) ...{
            f.elements[i].checked
=true;
            }

        }

    }

    
function  SetUnchecked(boxname)  ... {
        f
=document.form1;
    
        
for( i=0 ; i<f.elements.length ; i++...{
            
if (f.elements[i].name==boxname) ...{
            f.elements[i].checked
=false;
            }

        }

    }

    
function  inverse(boxname)  ... {
        f
=document.form1;
    
        
for( i=0 ; i<f.elements.length ; i++...{
            
if (f.elements[i].name==boxname) ...{
               
if(f.elements[i].checked==false)...{
                      f.elements[i].checked
=true;
               }
else if(f.elements[i].checked==true)...{
                         f.elements[i].checked
=false;            
                     }

            }

        }

    }


</ script >
<div class="use_table_bottom">
<div class="use_table_bottom_left">
<span class="font_12_left">
<img src="/xlyc_art/images/top_03.gif" width="32" height="10" />
<a href="javascript:;" onclick="SetChecked('id');return false;">全选 </a>
&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="SetUnchecked('id');return false;">
全不选 </a>&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="inverse('id');return false;">
反选 </a></span></div>
	 <div class="use_table_bottom_center">

你可能感兴趣的:(JavaScript,F#)