中文(繁体)
<style type="text/css"> <!-- .row {BACKGROUND-COLOR: 表達式(rowIndex%2==1?'':'#F5F5F5')} 正文 {FONT-SIZE: 12px;字體系列:Arial、Verdana、sans-serif;行高:150%;} Td {字體大小:12px;字體系列:Arial、Verdana、sans-serif;行高:150%;} .tb {border-collapse:折疊} --> </style> <script language="JavaScript" type="text/JavaScript" > / /複選function selectAll(chk) { var chk = document.form1.chkAll.checked; for (i=0;i<document.all.length;i++) { if (document.all[i].name=="id[]") { document.all[i].checked=chk; } chkRow(document.all[i]); }}} //複選後儲存格修改 function chkRow(obj){ var r = obj.parentElement.parentElement; if(obj.checked){ r.style.backgroundColor="#E6E9F2";} else {if(r.rowIndex%2==1)r.style.backgroundColor="";else r.style.backgroundColor="# 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"> <tdalign= "center"><input type="checkbox" name="id[]" value="1" onclick="javascript:chkRow(this);"></td> <tdalign="center" >建站學院</ td> <tdalign="center"><a href="http://www.downcodes.com" target="_blank">http://www.downcodes.com</a>< /td> </tr > <tr class="row"> <tdalign="center"><input type="checkbox" name="id[]" value="1" onclick="javascript:chkRow(this );"></td > <tdalign="center">asp.net</td> <tdalign="center"><a href="http://www.downcodes.com" target="_blank ">http://www.downcodes .com</a></td> </tr> <tr class="row"> <tdalign="center"><input type="checkbox" name="id []" value="1" onclick= "javascript:chkRow(this);"></td> <tdalign="center">微軟中國</td> <tdalign="center"><a href= "http://www.microsoft.com/china " target="_blank">http://www.microsoft.com/china</a></td> </tr> <tr class="row"> <td colspan="3"><input type= "checkbox" name="chkAll" title="全選/取消" onclick="selectAll()"> <strong>全選/取消</strong></td > </tr> </form> </table > ------------------------------------- ------------ ---------------------- <style type="text/css"> <!-- Td {FONT -尺寸:12像素;字型系列:Arial、Verdana、sans-serif;行高:150%;} --> </style> <script> function bgChange(obj){ obj.bgColor=obj.bgColor==""?"# ffffff" :""; } </script> <table width="100%" border="0" cellspacing="1" bgcolor=#66ccee> <tr onclick="bgChange(this)" bgcolor=#ffffff> <td>http:// www.downcodes.com</td> </tr> <tr onclick="bgChange(this)" bgcolor=#ffffff> <td>http://www.downcodes.com</td> </tr> <tr onclick="bgChange(this)" bgcolor=#ffffff> <td>http://www.downcodes.com</td> </tr> </table>