html tr td colspan
colspan 属性规定单元格可横跨的列数,
第一行的colspan规定其一行所跨越的列数,要与下一行的<td></td>个数一致
if(!empty ($alarmDescArr))
{
echo '<table width="80%" border="0" cellspacing="0" class="tableNormal" id=THAlarmCfgid >
<tr bgcolor="#0099FF">
<td class="tableTitleL1" colspan="10"><font color="#FFFFFF">告警描述与条件</font></td>
</tr>
<tr> <td nowrap class="tableSingularLine">告警描述使能</td>
<td nowrap class="tableSingularLine">告警描述</td>
<td nowrap class="tableSingularLine">告警级别</td> <td nowrap class="tableSingularLine">告警描述延迟时间</td>
<td nowrap class="tableSingularLine">告警运行参数</td>
<td nowrap class="tableSingularLine">告警运行参数判断条件</td>
<td nowrap class="tableSingularLine">告警条件条件值A</td>
<td nowrap class="tableSingularLine">告警条件条件值B</td>
<td nowrap class="tableSingularLine">添加告警条件</td>
<td nowrap class="tableSingularLine">删除告警条件</td>
</tr>
';
} for($i=0;$i<count($alarmDescArr); $i++)
{
if ($i%2)
{
$szClass = "tableEvenLine";
}
else
{
$szClass = "tableSingularLine";
}
echo("<tr id=alarmDefine ".$i." >"); // disabled delete alarm
if($alarmDescArr[$i]['wd_encblelog'] == 1)
$alarmDescEnalbe = "checked";
else
$alarmDescEnalbe = ""; // echo $alarmDescArr[$i]['wd_encblelog']; // 告警描述使能
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wd_encblelog] type=checkbox class=textEnaSty value=1 ".$alarmDescEnalbe." size=10
maxlength=10 disabled></td>"); // 传递wd_id 与 wd_priority
// echo("<input name=alarmDescArr[".$i."][wd_id] type=\"hidden\" class=textEnaSty value=\"".$alarmDescArr[$i]['wd_id']."\" >");
// echo("<input name=alarmDescArr[".$i."][wd_priority] type=\"hidden\" class=textEnaSty value=\"".$alarmDescArr[$i]['wd_priority']."\" >"); // 告警描述
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wd_warndesc] type=text class=textEnaSty value=\"".$alarmDescArr[$i]['wd_warndesc']."\" size=15
maxlength=10 disabled></td>"); // 告警级别
echo("<td nowrap class=".$szClass.">
<select name=alarmDescArr[".$i."][wd_level] size=1 class=textEnaSty>
<option value=". $alarmDescArr[$i]['wd_level'] ." selected disabled>".$alarmLev[$alarmDescArr[$i]['wd_level']]."</option>
</select>
</td>"); //告警描述延迟时间 通过OpenNewWindow
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wd_delay] type=text class=textEnaSty value=\"".$alarmDescArr[$i]['wd_delay']."\" size=10
maxlength=10 disabled></td>"); // 运行参数
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wc_parameters] type=text class=textEnaSty value=\"".$alarmDescArr[$i]['wc_parameters']."\" size=10
maxlength=10 disabled></td>"); // 判断条件
echo("<td nowrap class=".$szClass.">
<select name=alarmDescArr[".$i."][wc_conditions] size=1 class=textEnaSty>
<option value=". $alarmDescArr[$i]['wc_conditions'] ." selected disabled>".$alarmJdgCon[$alarmDescArr[$i]['wc_conditions']]."</option>
</select>
</td>"); // 条件值A
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wc_value0] type=text class=textEnaSty value=\"".$alarmDescArr[$i]['wc_value0']."\" size=10
maxlength=10 disabled></td>"); // 条件值B
echo("<td nowrap class=".$szClass.">
<input name=alarmDescArr[".$i."][wc_value1] type=text class=textEnaSty value=\"".$alarmDescArr[$i]['wc_value1']."\" size=10
maxlength=10 disabled></td>"); // 添加告警条件
echo("<td nowrap class=".$szClass.">
<input name=alarmDefine[".$i."]['alarm_delete'] type=button class=inputButtonNormal
value='添加' onClick='OpenNewWindow(".$alarmDescArr[$i]['wd_id'].",".$alarmDescArr[$i]['wd_priority'].",".$device_type_id.")' size=50></td>"); // 删除告警描述及相关的告警条件
echo("<td nowrap class=".$szClass.">
<input name=alarmDefine[".$i."][con_add] type=button class=inputButtonNormal
value='删除' onClick='alarmDelete(".$alarmDescArr[$i]['wd_id'].",".$alarmDescArr[$i]['wd_priority'].",".$device_type_id.",\"".$alarmDescArr[$i]['wc_parameters']."\")'></td>"); echo("</tr>"); } if(!empty ($alarmDescArr))
{ echo "</table>"; echo "<p></p>";
}
效果如下:

html tr td colspan的更多相关文章
- 根据div 标签 查看数组@class=modulwrap 下面的/table/tbody/tr/td
<div class="modulwrap"> <div class="request_title"> <span class=& ...
- html5 表格标签 table tr td
最重要的三个 <table> 表格声明标签 属性: boarder 边框粗细 style 可配合css 使用 <tr> 行标签 table row ...
- HTML 表格<table><caption><th><tr><td><thead><tbody><tfoot><col><colgroup>
<table>标签: 定义和用法: <table>标签定义HTML表格. 简单的HTML表格由table元素以及一个或多个tr.th或td元素组成. tr元素定义表格行,th元 ...
- HTML中表格元素TABLE,TR,TD及属性的语法
table:表格元素及属性 <table width="80%" border="1" cellspacing="1" cellpad ...
- <td colspan="2" > 一个td占两个 td空间
<tr> <td>机构名称: ${accreditInfo.companyName}</td> <td>初始授信额度: ${accreditInfo.i ...
- jquery动态添加/删除 tr/td
<head runat="server"> <title></title> <!--easyui --> <link rel= ...
- js动态添加table 数据tr td
成果库修改: 要求主题列表随成果类型改变而改变 网上查询资料后开工,在成果类型下拉框添加change()事件触发Dwr,查询主题集合——动态创建/编辑Table 概要代码 ...
- html中table,tr,td
table表格,tr表格中的行,tr表格中的列,等级关系是table>tr>td, 当然表格中还包括thead,tbody,tfoot,th,但由于浏览器支持缘故很少使用.另外table在 ...
- js动态添加<tr><td>
<form id="addNewsFormData" name="addNewsFormData" isCheck="true" ac ...
随机推荐
- EF实体框架之CodeFirst八
前面七篇基本把Code First学习了一下,不过code first中会出现一个问题,就是数据迁移的问题. 一.数据准备 还是在前面的demo上修改,这次使用Province和City类. publ ...
- [C/C++基础] C语言常用函数strlen的使用方法
函数声明:extern unsigned int strlen(char *s); 所属函数库:<string.h> 功能:返回s所指的字符串的长度,其中字符串必须以’\0’结尾 参数:s ...
- 多个div背景图无缝拼接
公司在做环形进度条的时候遇到了这个问题,上网一搜,原来是因为两个div背景图拼接起来的,所以中间出现了必不可少的缝隙,最后把position改为relative,再加个margin:0,就解决好了,下 ...
- [bzoj 2151]种树(贪心)
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2151 分析:原型是bzoj 1150(CTSC 2007) 首先DP无法下手,想到贪心.想到贪 ...
- 第三章:javascript: 列表
在日常生活中,人们经常使用列表:待办事项列表,购物清单,十佳榜单,最后十名榜单等.计算机也在使用列表,尤其是列表中元素保存的是太多时.当不需要一个很长的序列中查找元素,或对其进行排序时,列表显得尤为有 ...
- Unknown column '' in 'field list'解决方案
很多人在用php+MySQL做网站往数据库插入数据时发现如下错误: 注册失败!Unknown column '1a' in 'field list' 结果发现用数字提交是没有问题的,其他如char型就 ...
- Linq 分页不可缺少的两个方法
//LINQ分页的方法 //1.获取总页数 public int GetPageCount(int pageSize)//pageSize是每页的行数 { //先查出总共有多少行 int rowCou ...
- POJ3038 Flying Right
Description Figuring that they cannot do worse than the humans have, Farmer John's cows have decided ...
- 洛谷P1661 扩散
题目描述 一个点每过一个单位时间就会向四个方向扩散一个距离,如图. 两个点a.b连通,记作e(a,b),当且仅当a.b的扩散区域有公共部分.连通块的定义是块内的任意两个点u.v都必定存在路径e(u,a ...
- Codeforces 650C Table Compression
传送门 time limit per test 4 seconds memory limit per test 256 megabytes input standard input output st ...