+ Start a Discussion
Dileep KumarDileep Kumar 

Javascript and visualforce related problem

Hi All,

function setVar(){
       var v= document.getElementById("cbid").getAttribute.style.(backgroundColor).value;
       if(v == ''){

I am calling this function on button click but i am not getting any alert.

Actually i want to get the background color of  <td>. By using javaScript.

Please help me.

Thanks in advance,


Best Answer chosen by Dileep Kumar
Vivek DVivek D
// Try This 
var v = document.getElementById("cbid").style.getPropertyValue("background-color");