0
看下面是我的代码来改变使用javascript的td onclick的背景。如何调用td的id来改变css样式onclick
window.onload = function() {
document.getElementById('auth').onclick=change;
};
function change(){
this.className="authorised_reporter";
}
如何改变另一TD的CSS同时在点击一个td.see我的HTML
<td id="main" class="account_holder">
<h1 align="center">Main Account Holder</h1></td>
<td id="auth" class="authorised_reportericon" >
<p align="center" style="color:black;font-size:16px;">Authorised Reporters</p></a>
</td>
什么,我希望是onclicking授权记者的TD,TD这主要与账户持有人TD的背景下也得到改变。这是可能的JavaScript。
,它为我工作,感谢您的帮助 – user2086641 2013-04-25 19:56:18
你是欢迎。 – Anoop 2013-04-25 19:56:56
你应该接受这个答案,因为它为你工作。 – sgroves 2013-04-25 20:09:06