我的表列在html中自动增加
My table column in html automatically increases
这是我的代码。
<table id="addComments" style="width:430px; table-layout:fixed; display:none; padding-right:3px; padding-left:3px;">
<tr>
<td colspan="3">
<textarea id="textArea" rows="15" cols="0" style="width:430px; overflow:hidden;"></textarea>
</td>
</tr>
<tr>
<td>
<div id="noComments" style="color:red; display:none;">Please write your comments.</div>
</td>
<td>
here is some image whose display is none
</td>
<td>
<input id="commentBtn" type="button" onclick="getTxt()" value="Add Comments" class="button default bt-large"/>
</td>
</tr>
</table>
其中第1行是colspan在第2行有3列其中2列显示无当其中一个隐藏列可见第一行自动扩展请任何解决方案
您已经有了一个div来显示消息。去掉三列,只用一列。显示/隐藏列在浏览器中不太好用。对于图像和按钮,只需提到display: inline-block。
使用visibility: hidden;
代替display:none;
,这将为内容保留空间,但不可见
相关文章:
- 使用 jQuery 增加 HTML 选择框的大小属性
- 如何使用 html 根据表内容增加图像大小
- 增加在选择元素HTML中搜索的时间
- 使用箭头键javascript和/或jQuery增加html锚点
- 如何使用 HTML 5 日期输入增加月份 - 将结果输出到 DOM
- 如何在 HTML 和 jQuery 中增加行高
- 选中复选框时,有没有办法增加 HTML 表格单元格的值(仅限整数)
- 标题菜单的高度增加了,但在HTML源代码中什么也没发生
- 如何在html/php中增加变量
- 在javascript上使用onClick增加变量值,并在HTML表单上显示新值
- 增加HTML/CSS/JS中输入字段的大小
- 我的表列在html中自动增加
- 如何在html中增加画布图像的大小
- 通过php函数增加HTML表行
- HTML范围输入增加/减少值问题
- 在HTML页面中增加菜单项
- 如何在PHP中动态持续增加html表的数量
- 如何增加html输入名称
- 在javascript中动态增加HTML表的行大小
- 在输入字段中自动增加HTML表单id