解决IE下contenteditable无效的问题

一般情况下在谷歌对标签使用

contenteditable:true;

可以实现对标签的文字编辑

 

但是在IE下如果直接对表格 td  标签使用则无效

解决方案是

在 td 中添加可编辑的div元素

<div contenteditable="true" style="width: 100%; height: 100%;border:0"></div>

 

posted @ 2022-06-07 10:37  RookieCoderAdu  阅读(346)  评论(0)    收藏  举报