如何隐藏表单中的某个列,不显示该列!

cyxin2121921 2009-03-20 08:43:53
<form action="include/compute.php" method="post" target="bottom">
<?php
$total = 0;
$i = 0;

while($detail[11][$i])//判断是否还有孩子节点
{


<?php //属装图号?>
<td align=center NOWRAP>
<input type="text" name="upcode<?php echo $i+1;?>" size="16" value="<?php echo $detail[3][$i];?>" <?php
if($i%2 == 1)
{
?>style="background:#DBDBDB"<?php
}
else
{
?>style="background:#EBEBEB"<?php
}?>/>
</td>
<?php //属装图名?>
<td align=center NOWRAP>
<input type="text" name="upname<?php echo $i+1;?>" size="20" value="<?php echo $detail[26][$i];?>" <?php
if($i%2 == 1)
{
?>style="background:#DBDBDB"<?php
}
else
{
?>style="background:#EBEBEB"<?php
}?>/>
</td>

$total = $total/10000;
$total = round($total,3);
$k = $i;

?>

<input type="submit" name="Submit" value="录入">
</form>



我想把 属装图号 的内容给隐藏起来,但是现在的情况是 内容的确是不显示了,但是却留出来了一个空列(如何把这个空列给取消呢?),我想该怎么才能够 实现 把后面各列的内容依次提前呢?(把属装图号所在列给覆盖掉)
...全文
537 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
总哈哈 2009-03-20
  • 打赏
  • 举报
回复
用一个CSS隐藏,或者直接不显示就可以了嘛!用js把宽度设置为0.不知道可以不,很多种实现的方法的。
cyxin2121921 2009-03-20
  • 打赏
  • 举报
回复
<table border="1" bgcolor="#EBEBEB" bordercolor="#888888" cellspacing="2" cellpadding="2">    
<tr bordercolor="C6E2FF">

<th width = 50>序号</th>


<th width = 150>属装图号</td>
<th width = 250>图号</td>
<th width = 250>图名</td>

</tr>

<form action="include/compute.php" method="post" target="bottom">
<?php
$total = 0;
$i = 0;

while($detail[11][$i])//判断是否还有孩子节点
{


<?php //属装图号?>
<td align=center NOWRAP>
<input type="text" name="upcode<?php echo $i+1;?>" size="16" value="<?php echo $detail[3][$i];?>" <?php
if($i%2 == 1)
{
?>style="background:#DBDBDB"<?php
}
else
{
?>style="background:#EBEBEB"<?php
}?>/>
</td>
<?php //属装图名?>
<td align=center NOWRAP>
<input type="text" name="upname<?php echo $i+1;?>" size="20" value="<?php echo $detail[26][$i];?>" <?php
if($i%2 == 1)
{
?>style="background:#DBDBDB"<?php
}
else
{
?>style="background:#EBEBEB"<?php
}?>/>
</td>

$total = $total/10000;
$total = round($total,3);
$k = $i;
echo "</table>";//表

?>

[code=HTML] <input type="submit" name="Submit" value="录入">
</form>
cyxin2121921 2009-03-20
  • 打赏
  • 举报
回复
<table border="1" bgcolor="#EBEBEB" bordercolor="#888888" cellspacing="2" cellpadding="2">	
<tr bordercolor="C6E2FF">

<th width = 50>序号</th>
<th width = 100>领料单位</th>

<th width = 150>新物料码</th>
<th width = 150>用友码</th>
<th width = 100>转换率</td>

<th width = 100>计划价</td>
<th width = 100>设计用量</td>
<th width = 75>单项成本</td>

<th width = 150>属装图号</td>
<th width = 250>图号</td>
<th width = 250>图名</td>
<th width = 50>键号</td>

<th width = 250>材料</td>
<th width = 150>定额</td>
<th width = 220>下料尺寸</td>
<th width = 100>单重</td>
<th width = 100>总重</td>
<th width = 100>数量</td>
<th width = 200>备注</td>
<th width = 50>计量单位</td>
<th width = 150>工艺分工</td>
<th width = 150>所属产品</td>
<th width = 150>自制/外购</td>
<th width = 150>20</td>

<th width = 50>G1</td>
<th width = 50>G2</td>
<th width = 50>G3</td>
<th width = 50>G4</td>
<th width = 50>G5</td>
<th width = 50>G6</td>
<th width = 50>G7</td>
<th width = 50>G8</td>
<th width = 50>G9</td>

</tr>
程序猿之殇 2009-03-20
  • 打赏
  • 举报
回复
将<td></td>放到判断代码里
或者css, 用display:none
yctin 2009-03-20
  • 打赏
  • 举报
回复
form 之后是 td =_=||
table , tr , tbody 都去那里了
zilingzhi 2009-03-20
  • 打赏
  • 举报
回复
你可以把属装图号 的内容放到一个浮动层中,BLOCK ;这样就没有问题了。
cyxin2121921 2009-03-20
  • 打赏
  • 举报
回复
能否说的在具体一些?
jim8590251 2009-03-20
  • 打赏
  • 举报
回复
可以在td里加个 style='display:none'
那样就整个TD都隐藏起来了
ligy19840101 2009-03-20
  • 打赏
  • 举报
回复
把那列的<td>放到判断是否显示的代码里面

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧