CSDN论坛 > Java > Web 开发

能否动态改变 width的值? <td width="11%"></td>, 以及动态改变td 的数量? [问题点数:10分,结帖人ATCG]

Bbs2
本版专家分:185
Blank
黄花 2002年6月 其他数据库开发大版内专家分月排行榜第二
结帖率 99.74%
CSDN今日推荐
Bbs7
本版专家分:11015
Bbs2
本版专家分:185
Blank
黄花 2002年6月 其他数据库开发大版内专家分月排行榜第二
匿名用户不能发表回复!
其他相关推荐
td 设置colspan之后设置td width 无效
table设置了colspan之后出现td宽度显示不正常,这种情况下,可以通过设置table width=“100%”table-layout="fixed" 解决,当JS动态设置tr的隐藏(即style.display = ‘’)无效时也可以试试,因为我试过style.display = ‘inline’,但是显示时colspan属性失效了,给table加上 width=“100%”tabl
效果代码 电子商务专用
<style>#top a img{ border:0px; background: none repeat scroll 0 0 #ffffff;} #top a:hover img{ opacity: 0.3;cursor:hand; background: none repeat scroll 0 0 #000000;}</style> <div class="mc" style=";min-height:0px;"> <table cellspacing="0" cellpadding="0" width="990"> <tbody> <tr> <td height="5" width="491"> &nbsp; </td> <td width="10" height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> <tr> <td id="top" width="491"> <a href="http://mall.jd.com/index-36534.html" target="_blank"><img alt="" src="http://img13.360buyimg.com/cms/g13/M06/07/11/rBEhUlKUGYsIAAAAAACVBgMIHFQAAF8FADp1uEAAJUe282.jpg" /></a> </td> <td> &nbsp; </td> <td id="top" width="487"> <a href="http://obm1688.jd.com/" target="_blank"><img alt="" src="http://img12.360buyimg.com/cms/g14/M07/02/1F/rBEhVVKUDwsIAAAAAACddJ30vnUAAGE7wMJRywAAJ2M237.jpg" /></a> </td> </tr> <tr> <td height="5" width="491"> &nbsp; </td> <td height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> <tr> <td id="top" width="491"> <a href="http://mall.jd.com/index-18930.html" target="_blank"><img alt="" src="http://img14.360buyimg.com/cms/g15/M00/18/07/rBEhWlKUEXIIAAAAAACZNCKI2d0AAF8WQHH9DgAAJlM028.jpg" /></a><a href="http://obm1688.jd.com/" target="_blank"></a> </td> <td> &nbsp; </td> <td id="top" width="487"> <a href="http://mall.jd.com/index-23958.html" target="_blank"><img alt="" src="http://img12.360buyimg.com/cms/g15/M04/18/08/rBEhWVKUFP4IAAAAAACX7ABEnMAAAF8aQKiv08AAJgE072.jpg" /></a> </td> </tr> <tr> <td height="5" width="491"> &nbsp; </td> <td height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> <tr> <td id="top" width="491"> <a href="http://wohayo.jd.com/" target="_blank"><img alt="" src="http://img13.360buyimg.com/cms/g14/M08/03/00/rBEhVlKUKxwIAAAAAACamuFo6qkAAGFUQCZULYAAJqy405.jpg" /></a> </td> <td> &nbsp; </td> <td id="top" width="487"> <a href="http://mall.jd.com/index-43555.html" target="_blank"><img alt="" src="http://img11.360buyimg.com/cms/g14/M08/03/00/rBEhVlKUKyUIAAAAAAD6Jzf8LwsAAGFUQIJAewAAPo_402.jpg" /></a> </td> </tr> <tr> <td height="5" width="491"> &nbsp; </td> <td height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> <tr> <td id="top" width="491"> <a href="http://jenmick.jd.com/" target="_blank"><img alt="" src="http://img12.360buyimg.com/cms/g14/M04/03/01/rBEhVVKUQs8IAAAAAAFBFkrF15oAAGFsgGA-xMAAUEu343.jpg" /></a> </td> <td> &nbsp; </td> <td id="top" width="487"> <a href="http://wantdo.jd.com/" target="_blank"><img alt="" src="http://img13.360buyimg.com/cms/g13/M06/07/13/rBEhU1KURlYIAAAAAAFhUThMfSgAAF8uAGM5_gAAWFp811.jpg" /></a> </td> </tr> <tr> <td height="5" width="491"> &nbsp; </td> <td height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> <tr> <td height="5" width="491"> &nbsp; </td> <td height="5"> &nbsp; </td> <td height="5" width="487"> &nbsp; </td> </tr> </tbody> </table> </div>
JSP图书管理系统
项目使用说明 tushu是本书最一章的综合案例程序,在运行前请正确配置JDK和Tomcat,然后再复制tushu文件夹到Tomcat的webapps\examples 文件夹下即可。 本项目仅用于学习目的。读者若对项目有问题 请和我一起交流: <%@ page contentType="text/html;charset=gb2312" language="java"%> <html> <%@ include file="inc/conn1.jsp"%> <%@ include file="top.jsp"%> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>计算机图书--管理系统</title> </head> <body > <table width="900" border="0" align="center" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="39" rowspan="9" align="right" valign="top"><img src="image/y1.jpg" width="39" height="1007"></td> <td width="206" height="13"></td> <td width="7"></td> <td width="605"></td> <td width="7">&nbsp;</td> <td width="36" rowspan="9" valign="top"><img src="image/z1.jpg" width="36" height="1006"></td> </tr> <tr> <td height="108" valign="top"><table width="206" height="110" border="0" cellpadding="0" cellspacing="0" background="image/dongkuaif.gif"> <!--DWLayoutTable--> <tr> <td width="15" height="9"></td> <td width="181"></td> <td width="10"></td> </tr> <tr> <td height="86"></td> <td align="center" valign="middle"><span class="stylex"> <script language="JavaScript">var when=new Date(); document.write("<h4>"); document.write(when.getYear()+"年"); document.write((when.getMonth()+1)+"月"); document.write(when.getDate()+"日<br>"); document.write(when.getHours()+"时"); document.write(when.getMinutes()+"分"); document.write("</h4>"); </script></span></td> <td></td> </tr> <tr> <td height="15"></td> <td>&nbsp;</td> <td></td> </tr> </table></td> <td>&nbsp;</td> <td rowspan="3" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="605" height="167" valign="top"><img src="image/tupic.gif" width="605" height="167"></td> </tr> </table></td> <td>&nbsp;</td> </tr> <tr> <td height="7"></td> <td></td> <td></td> </tr> <tr> <td colspan="2" rowspan="5" valign="top"> <table width="208" height="123" border="0" cellpadding="0" cellspacing="0" background="image/logn.jpg"> <!--DWLayoutTable--> <tr> <td width="8" height="24">&nbsp;</td> <td width="200">&nbsp;</td> </tr> <tr> <td height="99">&nbsp;</td> <td><%@ include file="denglu.jsp"%></td> </tr> </table> <table width="208" border="0" cellpadding="0" cellspacing="0" background="image/dongkuaid.gif"> <!--DWLayoutTable--> <tr> <td width="215" height="42">&nbsp;</td> </tr> <tr> <td height="277" align="center" valign="top"><%@include file="changxiao.jsp"%></td> </tr> </table> <br> <table width="208" height="356" border="0" cellpadding="0" cellspacing="0" background="image/chuxiao.gif"> <!--DWLayoutTable--> <tr> <td width="24" height="37">&nbsp;</td> <td width="184">&nbsp;</td> <td width="7"></td> </tr> <tr> <td height="293">&nbsp;</td> <td valign="top"><%@ include file="chuxiao.jsp"%></td> <td></td> </tr> <tr> <td height="24">&nbsp;</td> <td>&nbsp;</td> <td></td> </tr> </table></td> <td height="67"></td> </tr> <tr> <td height="187" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="image/link.gif"> <!--DWLayoutTable--> <tr> <td width="20" height="5"></td> <td width="495"></td> <td width="69"></td> <td width="21"></td> </tr> <tr> <td height="21"></td> <td valign="top"><%@ include file="scroll.htm"%></td> <td></td> <td></td> </tr> <tr> <td height="38"></td> <td>&nbsp;</td> <td></td> <td></td> </tr> <tr> <td height="105">&nbsp;</td> <td colspan="2" valign="top"><%@ include file="toplist.jsp"%></td> <td>&nbsp;</td> </tr> <tr> <td height="18">&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table></td> <td></td> </tr> <tr> <td height="11"></td> <td></td> </tr> <tr> <td height="242" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="image/tonew.gif"> <!--DWLayoutTable--> <tr> <td width="7" height="1"></td> <td width="591"></td> <td width="7"></td> </tr> <tr> <td height="33" colspan="3" valign="middle" bgcolor="#F7F7F7"><span style="font-size: medium">新进图书</span></td> </tr> <tr> <td height="10"></td> <td></td> <td></td> </tr> <tr> <td height="172"></td> <td valign="top"><%@ include file="newbooks1.jsp"%></td> <td></td> </tr> <tr> <td height="26"></td> <td>&nbsp;</td> <td></td> </tr> </table></td> <td></td> </tr> <tr> <td height="338" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="605" height="4"></td> </tr> <tr> <td height="353" valign="top"> <%@ include file="new.jsp"%></td> </tr> <!--DWLayoutTable--> </table></td> </tr> </table> <%@ include file="end.jsp"%> </table> </body> </html>
在ie7、ie8下 td th宽度解决方法
.title {background-color:#ccc;width: 150px} 哈哈 aa 大都会 bb adad alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快的拉拉alkjd阿拉快
JSP教材12334
dukebanner.html] <table border="0" width="400" cellspacing="0" cellpadding="0"> <tr> <td height="150" width="150"> &nbsp; </td> <td width="250"> &nbsp; </td> </tr> <tr> <td width="150"> &nbsp; </td> <td align="right" width="250"> <img src="duke.waving.gif"></td></tr></table><br> helloworld.jsp <%@ page info="a hello world example" %> <html> <head><title>Hello, World</title></head> <body bgcolor="#ffffff" background="background.gif"> <%@ include file="dukebanner.html" %> <table> <tr> <td width=150> &nbsp; </td> <td width=250 align=right> <h1>Hello, World!</h1> </td> </tr> </table> </body> </html>
extjs4 模板值和模板
extjs4 模板值和模板 1、append方法 Javascript代码 var tpl = new Ext.Template(//定义模板 '<table border=1 cellpadding=0 cellspacing = 0>', '<tr><td width=90>姓名</td><td width=90>{0}</td></tr>', '<tr><td>年龄</td><td>{1}</td></tr>', '<tr><td>性别</td><td>{2}</td></tr>', '</table>' ) //模板值和模板进行组合并将新生成的节点插入到id为'tpl-table'的元素中 tpl.append('tpl-table',['小王',25,'男']); var tpl = new Ext.Template(//定义模板 '<table border=1 cellpadding=0 cellspacing = 0>', '<tr><td width=90>姓名</td><td width=90>{0}</td></tr>', '<tr><td>年龄</td><td>{1}</td></tr>', '<tr><td>性别</td><td>{2}</td></tr>', '</table>' ) //模板值和模板进行组合并将新生成的节点插入到id为'tpl-table'的元素中 tpl.append('tpl-table',['小王',25,'男']);
table td 中定义了 width 但 overflow 不起作用的解决方法
Html代码   >    html xmlns="http://www.w3.org/1999/xhtml">     head>      title> css table 超出隐藏 title>      style type="text/css">      table      {      width:100%;      table-layout : f
解决设置table中td宽度不生效
特性:table是一个整体,每一列td的宽度是由一个其中一个最长td的宽度决定的。 解决:一定要在table标签上加word-wrap: break-word; word-break: break-all;之后再设置百分比宽度就可以生效了(获取你用的bootstrap,可以添加col-md-1)
表格单元格td设置宽度无效的解决办法
http://zzstudy.offcn.com/archives/11366 在做table页面时,有时对td设置的宽度是无效的,td的宽度始终有内部的内容撑开,可以设置padding,但直接设置width却无效,下面我们来具体看下这个示例: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
很好用的JS日期时间型万年历控件
<td width="14%" height="26"> <div align="center"><img src="../images/dot01.gif" width="12" height="12"></div> </td> <td width="86%" height="26"><A HREF="/Doc/0903/13231054-3.htm">2009己丑(牛)年二十四节气<BR>及黄道十二宫时刻表</A></td> </tr> <tr> <td width="14%" height="26"> <div align="center"><img src="../images/dot01.gif" width="12" height="12"></div> </td> <td width="86%" height="26"><a href="http://www.nongli.net/万年历.rar">电子万年历下载</a></td> </tr><tr> <td width="14%" height="26"> <div align="center"><img src="../images/dot01.gif" width="12" height="12"></div> </td>
关闭
关闭