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类并将其添加到。代码看起来像这样:

更多相关文章

  1. JS和JQuery中如何获取和修改控件显示内容(如lable,div,h1)
  2. 填充HTML表格列,两个边框?
  3. 网站开发进阶(二十五)js如何将html表格导出为excel文件
  4. 100%高度分区内显示:表格单元分区
  5. html 防止表格或div被撑开
  6. 怎样把Excel表格转换成html网页格式输出?急!!
  7. html中插入activex控件之后 需要在 网页中实现控件的属性及方法,
  8. Html5的datetime-local控件
  9. HTML之表格篇——表格的嵌套

随机推荐

  1. 在Windows上安装最新的Apache 2.4.12遇到
  2. 使用Sublime Text 3的PHP 100%CPU使用率
  3. 如何使用spl_autoload_register?
  4. centos6.5下使用yum完美搭建LNMP环境(php
  5. 使用javascript将文件输入到php文件
  6. 如何使用Amazon S3创建一次性下载链接?
  7. 什么是从我的PHP网站过滤无效的utf8?
  8. php会话不在chrome和firefox中工作但在IE
  9. 快速配置IIS 6.0 php fastcgi +Zend Opti
  10. Ionic-3如何动态改变离子主题