为TD设置css类
16lz
2021-01-22
I am using a customized user control (that I don't have the permission to modify) which renders the HTML for a table as shown:
我正在使用自定义的用户控件(我没有权限进行修改),它为表格呈现HTML,如下所示:
<tr>
<td></td>
<td></td>
</tr>
It lets me add any control dynamically within the tags. My question is how would I set the style of the cell for the table cell. Normally, I would do <td class="myClass">
. Since I don't have the source code to modify it, the workaround I am using is to create a <div>
, set the CSS class and add it to the <td>
. The code looks something like this:
它允许我在标签内动态添加任何控件。我的问题是我如何设置表格单元格的单元格样式。通常,我会做。由于我没有源代码来修改它,我使用的解决方法是创建一个
,设置CSS类并将其添加到。代码看起来像这样:更多相关文章
- JS和JQuery中如何获取和修改控件显示内容(如lable,div,h1)
- 填充HTML表格列,两个边框?
- 网站开发进阶(二十五)js如何将html表格导出为excel文件
- 100%高度分区内显示:表格单元分区
- html 防止表格或div被撑开
- 怎样把Excel表格转换成html网页格式输出?急!!
- html中插入activex控件之后 需要在 网页中实现控件的属性及方法,
- Html5的datetime-local控件
- HTML之表格篇——表格的嵌套