显示朋友问,就简单写一个放这里。
<table align=center width=300>
<form action="" method="post">
<tr><td>每行<input type="text" name="r" size=3>个,共<input type="text" name="all" size=3>个。<input type="submit" name="submit" value="产生"></td></tr>
</form>
</table>
<table border=1 width=90% align=center>
<tr>
<%
if request.form("submit")<>"" then
all=int(request.form("all"))
r=int(request.form("r"))
for i=1 to all
if i>=(r-1) and i mod r=0 then
str=str&"<td>"&i&"</td></tr><tr>"
else
str=str&"<td>"&i&"</td>"
end if
next
n=r-(all mod r)
for m=1 to n
str=str&"<td>"&n&"</td>"
next
else
str="<td> </td>"
end if
response.write str
%>
</tr>
</table>
记录每行显示数个的计算
80酷酷网 80kuku.com