function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dileep KumarDileep Kumar 

Javascript and visualforce related problem

Hi All,

function setVar(){
       var v= document.getElementById("cbid");
       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");