请教一段ASP代码问题!!!谢谢!!!关于表格宽度!!!

来源:百度知道 编辑:UC知道 时间:2024/06/08 04:01:01
以下是这段代码,请看一看!!!是过程名~~
strTemp= strTemp & "<table width=100% border=0 cellspacing=3 cellpadding=0>"
strTemp= strTemp & "<tr>"
strTemp= strTemp & "<td width=25% rowspan=6>"
strTemp= strTemp & "<div align=center><a href=ProductShow.asp?ID=" & rsProduct("ID") & ">"

fileExt=lcase(getFileExtName(rsProduct("DefaultPicUrl")))
if fileext="jpg" or fileext="bmp" or fileext="png" or fileext="gif" then
strTemp= strTemp & "<img style='BORDER-LEFT-COLOR: #cccccc; BORDER-BOTTOM-COLOR: #cccccc; BORDER-TOP-COLOR: #cccccc; BORDER-RIGHT-COLOR: #cccccc' src=" & rsProduct("DefaultPicUrl") & " width=105 height=80 onload='javascript:DrawImage(this);'>"
else
if fileext="swf"

第一个<td width=12% height=12>修改百分比就可以了,换成绝对像素也成

"<td width=12% height=12>"
看到这样的代码了吗?width=12%有意思就是该TD占TABLE宽度(width)的12%,最后一个TD可以是默认,不用设定的。