asp 的菜鸟

来源:百度知道 编辑:UC知道 时间:2024/09/21 23:20:39
我刚刚开始学习asp,怎么也搞不明白了,怎么用asp在网页中输出用*组成的等腰三角形,平行四边形?那位大虾帮帮俺,小弟谢谢了.(就是用"*"堆成的等腰三角形,平行四边形)

'
鄙人愚钝,弄了半个小时才弄出来,希望您能用得上。
'
下面是ASP文件
#######################
<%
m=51 '底边长度,必须是单数
n=(m+1)/2
str="*" '前景符号
str2="." '背景景符号
For i=1 to n
For j=1 to m
If i=1 And j=n then
response.Write str
Else If i<>1 And i+j=n+1 then
tmp=j
response.Write str
Else If i<>1 And tmp+j=m+1 then
response.Write str
Else
If i=n then
response.Write str
Else
response.Write str2
End If
End If
End If
End if
Next
response.Write "<br>"
tmp=m+10
Next
%>

我也搞不明白
你干嘛要用ASP来输出这个呢
用JS或是HTML直接写出来不就行了

ASP是要计算和解释的,主要功能是针对数据