由于在制作html 表格,即table。会出现制作好的表格却不能输入文字的情况。
于是,我们可以有两种选择。
(1)添加文本框,即:<input type="text" style="" />
<table>
<tr>
<td> <input type="text" style="width:100%;height:100%" /></td>
</tr>
</table>
这样就可以往表格里面添加文本啦
(2)利用html5中的属性contenteditable即可,而且不会出现边框叠加的颜色加深问题
用法:
<table>
<tr>
<td contenteditable="true"></td>
</tr>
</table>
当然,由于浏览器版本的问题,低版本的浏览器本不支持html5的新属性,所以在使用时,要充分考虑到这一点。