js隠し列
3921 ワード
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML >
<HEAD >
<TITLE >New Document</TITLE >
<script language="javascript" >
function filterOnclick()
{
if(filter.value =="filter")
{
filter.value = "recover";
for(i=0; i <5;i++)
{
if(Checkbox1[i].checked == false)
{
for(j=0;j <Table1.rows.length;j++)
{
Table1.rows(j).cells(i).style.display= "none";
}
}
}
}
else if(filter.value == "recover")
{
filter.value = "filter";
for(i=0; i <5;i++)
{
Checkbox1[i].checked = false;
for(j=0;j <Table1.rows.length;j++)
{
Table1.rows(j).cells(i).style.display= "block";
}
}
}
}
</script >
</HEAD >
<BODY >
<P >
<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="300" border="1" >
<TR >
<TD width="20%" ><INPUT id="Checkbox1" type="checkbox" name="Checkbox1" >
</TD >
<TD width="20%" ><INPUT id="Checkbox2" type="checkbox" name="Checkbox1" >
</TD >
<TD width="20%" ><INPUT id="Checkbox3" type="checkbox" name="Checkbox1" >
</TD >
<TD width="20%" ><INPUT id="Checkbox4" type="checkbox" name="Checkbox1" >
</TD >
<TD width="20%" ><INPUT id="Checkbox5" type="checkbox" name="Checkbox1" >
</TD >
</TR >
<TR >
<TD width="20%" ><FONT face="MS UI Gothic" > </FONT > </TD >
<TD width="20%" ><FONT face="MS UI Gothic" > </FONT > </TD >
<TD width="20%" ><FONT face="MS UI Gothic" > </FONT > </TD >
<TD width="20%" ><FONT face="MS UI Gothic" > </FONT > </TD >
<TD width="20%" ><FONT face="MS UI Gothic" > </FONT > </TD >
</TR >
<TR >
<TD width="20%" >aa </TD >
<TD width="20%" >1.00 </TD >
<TD width="20%" >guige1 </TD >
<TD width="20%" > </TD >
<TD width="20%" > </TD >
</TR >
<TR >
<TD width="20%" >bb </TD >
<TD width="20%" >1.50 </TD >
<TD width="20%" >guige2 </TD >
<TD width="20%" > </TD >
<TD width="20%" > </TD >
</TR >
<TR >
<TD width="20%" >cc </TD >
<TD width="20%" >1.00 </TD >
<TD width="20%" >guige3 </TD >
<TD width="20%" > </TD >
<TD width="20%" > </TD >
</TR >
</TABLE >
</P >
<INPUT id="filter" type="button" value="filter" name="Button1" onclick="filterOnclick()" >
</BODY >
</HTML >