Debugging IE8 Javascript Replace innerHTML Runtime Error

前端 未结 10 1022
执笔经年
执笔经年 2020-12-09 17:33
function DeleteData(ID)
{
 var ctrlId=ID.id;

 var divcontents=document.getElementById(ctrlId).innerHTML;
 var tabid=ctrlId.replace(/div/,\'tab\');
 var tabcontents=         


        
10条回答
  •  臣服心动
    2020-12-09 17:49

    You can't set value to a table's innerHTML, you should access to child cells or rows and change them like that :

    document.getElementById(tabid).rows[0].cells.innerHTML = 'blah blah';
    

    For more info/example : Table, TableHeader, TableRow, TableData Objects

提交回复
热议问题