I'm trying to verify the content of cells in my table. If I just use alert to return the value of innerHTML of the cell, I am getting the correct value. But if I use it in if(cell[id].innerinnerHTML == "predefined cell content") alert("something"); The alert is not showing. But if I use if(cell[id].innerinnerHTML == " ") alert("something"); It will give the alert. And further, if I put if(cell[id].innerinnerHTML != " ") alert(cell[id].innerinnerHTML); I am getting "predefined cell content" Why is this so? How can use if(cell[id].innerinnerHTML == "predefined cell content") and get a similar output ? Please help Thanks