用ASP输出表格

来源:百度知道 编辑:UC知道 时间:2024/06/23 14:33:19
就是用ASP输出一个类似的表格
000 001 002 003 004
005 006 007 008 009
011 012 013 014 015
016 017 018 019 022
023 024 025 026 027
028 029 033 034 035
036 037 038 039 044
045 046 047 048 049
请仔细看一下里边的数字的规律,00开头的有九个,01开头的有8个,依此类推.有点像福彩3D的三个数字的组合,从0到9十个数字,排列,但是020和002认为是相同的,所以只显示002,就是这个意思.

<%Function FormatIntNumber(Expression,Digit)
If IsNumeric(Expression) = False Then
Exit Function
End If

While Len(Expression) < Digit
Expression = "0"&Expression
wend
FormatIntNumber = Expression
End Function%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><%
for iss=1 to 50
i=iss-1
i=FormatIntNumber(i,3)
'response.Write mid(i,3,1)&"<br>"
if mid(i,3,1)>=mid(i,2,1) then
%>
<td width="10%" height="30" align="center" class="td2"><%=i%></td>
<%
end if
if iss mod 5=0 then response.Write "</tr><tr>"
next
%>
</tr>
</table>

这个拿去吧,能用