我在表格行内的输入字段中有一个长文本,如下所示
<tr>
<td><input type="text" disabled="" value="John Doe" id="firstName" name="firstName"></td>
<td><input type="text" disabled="" value="test" id="custom2" name="custom2"></td>
<td class="tdthree"><input type="text" disabled="" value="Testing Very Bog Client Name to see How long Before This will Break . testing Test test test tesyTesting Very Bog aa" id="custom3" name="custom3"></td>
<td><input type="text" disabled="" value="09-09-1978" id="custom4" name="custom4"></td>
<td><input type="text" disabled="" value="Tes387314" id="custom1" name="custom1"></td>
</tr>
如果长度超过 td 宽度,我需要 tdthree td 中的文本换行。我一直在通过谷歌搜索,但似乎找不到跨浏览器 (IE7+) 的解决方案。有什么想法吗?
最佳答案
input
不会这样做
你可以简单地使用 textarea
为你做这件事
关于html - 在表 td 的输入内将长行换行成多行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18739219/