在ASP中,如何使表格的表头不跟着内容循环

2025-03-24 02:56:51
推荐回答(2个)
回答1:



固定表头和列



style='table-layout: auto' bordercolor='lightgrey'>



















































































ID0 CK0 Code0 Descirption0 TOL0 XS0 SS0 MS0 DS0 BS0 XL0 ML0 DL0 EM0 BM0
88 88 88 88 88 22 22 22 22 22 22 22 22 22 22
111 111 1111 This is Test 1 001 002 003 004 005 006 007 008 009 010
111 111 1111 This is Test 1 001 002 003 004 005 006 007 008 009 010
111 111 1111 This is Test 1 001 002 003 004 005 006 007 008 009 010



这是个例子,你做一个这样的样式,套用到你那里就可以了

回答2:

你说的对!应在应在循环外,见我的asp【部分代码:】
...














<%
While ((Repeat1__numRows <> 0) AND (NOT Rs2.EOF))
%>












<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Rs2.MoveNext()
Wend
%>
...

我的开放式基金一览表
基金代码 基金名称 日净值 日期 投资总额 基金分额 目前市值 增减金额 月数 基金成本
<%=(Rs2.Fields.Item("代码").Value)%> <%=(Rs2.Fields.Item("名称").Value)%> <%=Formatnumber((Rs2.Fields.Item("日净值").Value),4,-1)%> <%=(Rs2.Fields.Item("入日期").Value)%> <%=Formatnumber((Rs2.Fields.Item("投资额").Value),2)%> <%=Formatnumber((Rs2.Fields.Item("份额").Value),2)%> <%=Formatnumber((Rs2.Fields.Item("市值").Value),2)%> <%=Formatnumber((Rs2.Fields.Item("增减").Value),2,-1)%> <%=(Rs2.Fields.Item("天数").Value)%> <%=Formatnumber((Rs2.Fields.Item("成本").Value),4,-1)%>