阅读背景:

功能实现:在table中点击某一行,选中前面的checkbox并改变背景色

来源:互联网 

html  table:

<table id="mytable">
   <tr>
    <th rowspan="2"><input type="checkbox" id="selectAll"></th> 
    <th rowspan="2">1</th>
    <th rowspan="2">2</th>
    <th colspan="3">3</th>
    <th colspan="3">4</th>
   </tr>	
   <tr>
    <th>x</th>
    <th>y</th>
    <th>z</th>
    <th>x</th>
    <th>y</th>
    <th>z</th>
   </tr>				   
</table>  
//其他行通过js中的appendto动态添加
<table id="mytable">
   <tr>
   



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: