日期:2014-05-17  浏览次数:20917 次

一个样式控制的问题
<tr>
                <td   width= "70 "   class= "menu1 "> <span   class= "white_14 "> <a   href= "../index.asp "> 首页 </a> </span> </td>
                <td   class= "menu2 "> <span   class= "blank_14 "> <a   href= "../project/project_list.asp "> 外包信息 </a> </span> </td>
                </tr>
请问怎样控制在点击链接的时候把td的样式改为menu1   <span   class= "blank_14 "> 中blank_14样式该为white_14
谢谢!

------解决方案--------------------
<tr>
<td width= "70 " class= "menu1 ">
<span class= "white_14 "> <a href= "../index.asp "> 首页 </a> </span>
</td>
<td class= "menu2 ">
<span id= "sid " class= "blank_14 "> <a href= "../project/project_list.asp " onclick= "document.getElementById( 'sid ').style.className= 'white_14 ' "> 外包信息 </a> </span>
</td>
</tr>