Cannot read property *0* of null

前端 未结 4 1590
长发绾君心
长发绾君心 2021-01-13 08:22

I get this error \"Cannot read property \'0\' of null.\"

I have a table with

somename.html

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-13 09:00

    if your id is unique then this will work

    document.getElementById('td1').style.color = 'blue';
    

提交回复
热议问题