如何用asp循环显示字体的由大到小的显示?

来源:百度知道 编辑:UC知道 时间:2024/05/29 13:12:48
例如,要在页面依次一行一行的显示"欢迎你来到本站!"
字体大小由大到小的从6号字显示到1号字,怎样来用asp循环语句来写呢?
谢谢大家,急需!

根据你的要求,以及参考上面几位的回答,经过总结,给出几个答案:

1.
<%
for i=6 to 1 step -1
response.write "<font size="&i&">欢迎你来到本站!</font><br>"
next
%>
2.
<%
Dim i
i=6
while i>0
response.write "<font size="&i&">欢迎你来到本站!</font><br>"
i=i-1
wend
%>
3.
<%
Dim i
i=6
do while i>0
response.write "<font size="&i&">欢迎你来到本站!</font><br>"
i=i-1
loop
%>

<%
for i=6 to 1 step -1
response.write "<h"&i&">欢迎你来到本站!</h"&i&">"
next

反过来

for i=1 to 6
response.write "<h"&i&">欢迎你来到本站!</h"&i&">"
next
%>

除了用上面的for循环还可以用do...while和while循环

<%Dim i
i=1
do while i<7
response.write "<