用Hotmail的时候注意下,就是这个效果,代码如下:
<style type="text/css">
<!--
.row {BACKGROUND-COLOR: expression(rowIndex%2==1?'':'#F5F5F5')}
Body {FONT-SIZE: 12px; FONT-FAMILY: Arial,Verdana,sans-serif;LINE-HEIGHT: 150%;}
Td {FONT-SIZE: 12px; FONT-FAMILY: Arial,Verdana,sans-serif;LINE-HEIGHT: 150%;}
.tb {border-collapse: collapse}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
//复选
function selectAll(chk)
{
var chk = ;
for (i=0;i<;i++) {
if ([i].name=="id[]") {
[i].checked=chk;
chkRow([i]);
}}}
//复选后单元格变色
function chkRow(obj){
var r = ;
if(){ ="#E6E9F2";}
else {if(%2==1)="";else ="#F5F5F5";}
}
</script>
<table width="50%" border="1" cellpadding="3" cellspacing="0" bordercolor="#333333" class="tb">
<form name="form1" method="post" action="">
<tr class="row">
<td width="5%"> </td>
<td width="33%" align="center"><strong>论坛名称</strong></td>
<td width="62%" align="center"><strong>网址</strong></td>
</tr>
<tr class="row">
<td align="center"><input type="checkbox" name="id[]" value="1" onclick="javascript:chkRow(this);"></td>
<td align="center">织梦乱弹</td>
<td align="center"><a href="" target="_blank"></a></td>
</tr>
<tr class="row">
<td align="center"><input type="checkbox" name="id[]" value="1" onclick="javascript:chkRow(this);"></td>
<td align="center">经典论坛</td>
<td align="center"><a href="" target="_blank"></a></td>
</tr>
<tr class="row">
<td align="center"><input type="checkbox" name="id[]" value="1" onclick="javascript:chkRow(this);"></td>
<td align="center">点燃灵感</td>
<td align="center"><a href="" target="_blank"></a></td>
</tr>
<tr class="row">
<td colspan="3"><input type="checkbox" name="chkAll" title="全选/取消" onclick="selectAll()"> <strong>全选
表格各种特殊效果代码 来自淘豆网m.daumloan.com转载请标明出处.