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