日期:2014-05-17 浏览次数:20656 次
<style> .a{font-size:12pt} .b{font-size:20pt;color:blue} </style> <SCRIPT LANGUAGE="JavaScript"> function cg(index) { var table = document.getElementById("table1"); for (var i=0;i<table.rows.length;i++) { if(i==index) table.rows[i].className="b"; else table.rows[i].className="a"; } } </SCRIPT> <TABLE border=1 width=200 id="table1" class="a"> <TR onclick="cg(this.rowIndex)"> <TD>1</TD> <TD>1</TD> <TD>1</TD> </TR> <TR onclick="cg(this.rowIndex)"> <TD>2</TD> <TD>2</TD> <TD>2</TD> </TR> <TR onclick="cg(this.rowIndex)"> <TD>3</TD> <TD>3</TD> <TD>3</TD> </TR> </TABLE>