asp显示问题,请教!
显示时,字段名与内容不对齐,如下图,也知道哪出问题了,请指教,先谢谢先!代码如下:
<!--#include file="..\aspcon.asp"-->
<html>
<head>
<title>耗材领用情况</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body bgcolor="#FFFFFF" link="#0000FF" vlink="#0000FF" alink="#FF0000">
<center>
<h1>耗材领用情况汇总</h1>
<p><a href="fxcx.htm">(分项查询)</a></p>
</center>
<a href="..\dlcg.asp">返回前页</a>
<table border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 align=center>
<tr>
<td><font size="+2">编号</font></td>
<td><font size="+2">材料名称</font></td>
<td><font size="+2">型号或品牌</font></td>
<td><font size="+2">单位</font></td>
<td><font size="+2">数量</font></td>
<td><font size="+2">用途</font></td>
<td><font size="+2">领用人</font></td>
<td><font size="+2">保管人</font></td>
<td><font size="+2">领用时间</font></td>
<td><font size="+2">操作1</font></td>
<td><font size="+2">操作2</font></td>
</tr>
<%
Set rs = Server.CreateObject ("ADODB.Recordset")
sql="select * from lyb order by id asc"
rs.Open sql, conn, 1,1
if rs.eof then
response.write "暂无记录!"
response.end
end if
%>
<%
page=1 ' 设置变量PAGE=1
rs.PageSize = 20 '每页显示记录数
if Not IsEmpty(Request("Page")) then '如果PAGE已经初始化...
Page = CInt(Request("Page")) '接收PAGE并化为数字型赋给PAGE变量
if Page > rs.PageCount then '如果接收的页数大于总页数
rs.AbsolutePage = rs.PageCount '设置当前显示页等于最后页
elseif Page <= 0 then '如果page小于等于0
Page = 1 '设置PAGE等于第一页
else
rs.AbsolutePage = Page '如果大于零,显示当前页等于接收的页数
end if
End if
Page = rs.AbsolutePage
%>
<%
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if '利用for next 循环依次读出记录
%>
<table border=1 cellspacing=0 cellpadding=0 bordercolor=#000000 align=center>
<tr>
<td><%=rs("id")%></td>
<td><%=rs("name")%></td>
<td><%=rs("xh")%></td>
<td><%=rs("dw")%></td>
<td><%=rs("sl")%></td>
<td><%=rs("yt")%></td>
<td><%=rs("lyr")%></td>
<td><%=rs("bgr")%></td>
<td><%=rs("lysj")%></td>
<td><a href="lyedit.asp?id=<%=rs("id")%>">修改</a></td>
<td><a href="javascript:if (confirm('确定要删除该记录?')) {location.href='lydelet.asp?id=<%=rs("id")%>'}">
删除</a></td>
</tr>
</table>
</table>
<%
rs.MoveNext
next
%>
<center>
<%if request("page")>1 then%>
<a Href="lingyonglist.asp?Page=<% = 1%>">首页</a>
<a Href="lingyonglist.asp?Page=<% =request("page") -1 %>">上一页</a>
<%end if %>
<%if request("page")<>rs.pagecount then %>
<a Href="lingyonglist.asp?Page=<% =request("page") + 1%>">下一页</a>
<a Href="lingyonglist.asp?Page=<% = rs.PageCount%>">尾页</a>
<% end if %>
</center>
<%
rs.close
Set rs = Nothing
conn.close
set conn=nothing
%>
<p> </p>
</body>
</html>