I have been trying to change the background color of an element on a click event.. But the code seems not to be working..
Html
<td class="white" onclick="place(this,1,2)"></td>
Style
<style>
.black{
width: 70px;
height: 70px;
background-color:black;
}
.white{
width: 70px;
height: 70px;
background-color:white;
}
</style>
Below is a javascript function used..
function place(domObj,row,col){
alert(domObj.style.backgroundColor);
}
alert returns null..