单项选择题


对于上面的表格可以将其第3行的第2列的背景色设置为红色(#ff0000)的代码是(   ) 
A、document.getElementById("tb").cells[2][1].style.background-color='#ff0000'; 
B、document.getElementById("tb").cells[2][1].style.backgroundColor='#ff0000';
C、document.getElementById("tb").rows[2].cells[1].style.backgroundColor='#ff0000'; 
D、document.getElementById("tb").rows[2].cells[1].style.background-color='#ff0000';