<table>
<tr onmousemove="this.style.backgroudColor:'red'" onmouseleave="this.style=''">
<td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td></tr><tr><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td></tr><tr onmousemove="this.style.backgroudColor:'red'" onmouseleave="this.style=''">
<td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td></tr><tr><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td><td>aaaaaaa</td></tr>
</table>

解决方案 »

  1.   

    给段程序你看看!
    <TABLE BORDER="1" id=tbl style="border-collapse:collapse" cellspacing=0 cellpadding=0 borderColor='black'>
        <COL STYLE="color:red" id=col1 >
        <COL STYLE="color:blue" id=col2>
        <COL STYLE="color:green" id=col3>
        <TR onmouseover="this.style.backgroundColor='#cceedd'" onmouseout="this.style.backgroundColor=''">
            <TD onclick="col1.style.color=(col1.style.color=='red')?'orange':'red'" onmouseover="this.style.cursor='hand'">此列位于第一组。</TD>
            <TD onclick="col2.style.color=(col2.style.color=='blue')?'orange':'blue'" onmouseover="this.style.cursor='hand'">此列位于第二组。</TD>
            <TD onclick="col3.style.color=(col3.style.color=='green')?'orange':'green'" onmouseover="this.style.cursor='hand'">此列位于第三组。</TD>
        </TR>
        <TR onmouseover="this.style.backgroundColor='#ccddff'" onmouseout="this.style.backgroundColor=''">
            <TD>此列位于第一组。</TD>
            <TD>此列位于第二组。</TD>
            <TD>此列位于第三组。</TD>
        </TR>
         <TR onmouseover="this.style.backgroundColor='#dddddd'" onmouseout="this.style.backgroundColor=''">
            <TD>此列位于第一组。</TD>
             <TD>此列位于第二组。</TD>
            <TD>此列位于第三组。</TD>
        </TR></TABLE>
    <button onclick="alert(tbl.rows(0).cells(tbl.rows(0).cells.length-1).onclick);">test</button>
    <button onclick="col1.width='150px'">test</button>
    <button id="btn1">添加行</button><button id="btn2">添加列</button>
    <SCRIPT LANGUAGE=javascript>
    <!--
    var A=new Array('cc0099','99cc00','cc9966','cccc00','99ff99','99ff66','ff3399','cc6699','ff33ff','cc99cc','ffcc66');function btn1.onclick(){
    tbl.lastChild.appendChild(tbl.rows(tbl.rows.length-1).cloneNode(true));
    }function btn2.onclick(){
    var coln=tbl.firstChild.firstChild.cloneNode(true);
    coln.id='col'+(document.getElementsByTagName("COL").length+1);
    var t="#"+A[document.getElementsByTagName("COL").length-3]
    coln.style.color=t;
    tbl.firstChild.appendChild(coln);
    var newID=eval('col'+(document.getElementsByTagName("COL").length));
     
     for(i=0;i<tbl.rows.length;i++){
    newCell=tbl.rows(i).cells(0).cloneNode(true);
    newCell.innerText="这是新添加的列";
    if(i==0)newCell.onclick=function(){newID.style.color=newID.style.color==t?'orange':t}
    tbl.rows(i).appendChild(newCell);

      }}//-->
    </SCRIPT>
      

  2.   

    效果大都是css和web事件联合应用得来的,想要什么效果就能做什么效果:)