IE shows run time error for innerHTML

后端 未结 9 2100
谎友^
谎友^ 2020-12-11 09:54

I have a jsp page in which rows are created dynamically to a table using java script. It is working fine in all the browsers except IE. In IE it is showing the error Unknown

9条回答
  •  清歌不尽
    2020-12-11 10:17

    you can use innerText like this

    try{
         row.innerHTML =mystring1;
    }catch(e){
         row.innerText =mystring1;
         row.style.display='table-row';
    }
    

提交回复
热议问题