急急急ASP输出HTML代码

把以下每一句代码的意思都解释一下````
<html>
<head>
<title>输出HTML代码</title>
<%
sub WriteSuccessMsg(SuccessMsg)
dim strSuccess
strSuccess=strSuccess & "<html><head><title>成功信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
strSuccess=strSuccess & "</head><body><br>" & vbcrlf
strSuccess=strSuccess & "<table cellpadding=2 cellspacing=1 border=1 width=400 class='border' align=center>" & vbcrlf
strSuccess=strSuccess & " <tr align='center'><td height='22' class='title'><strong>恭喜你!</strong></td></tr>" & vbcrlf
strSuccess=strSuccess & " <tr><td height='100' class='tdbg' valign='top'><br>" & SuccessMsg &"</td></tr>" & vbcrlf
strSuccess=strSuccess &"<tr align='center'bgcolor=lightblue><td><a href='javascript:hist ory.go(-1)'><<返回上一页</a></td></tr>"& vbcrlf
strSuccess=strSuccess & "</table>" & vbcrlf
strSuccess=strSuccess & "</body></html>" & vbcrlf
response.write strSuccess
end sub
%>
</head>
<body>
<%
dim Msg
Msg="<font size=2>Response.Write输出成功,弹出定制窗口.</font>"
Call WriteSuccessMsg(Msg)
%>
</body>
</html>

这段代码的作用是页面上显示一个表格,提示成功信息,并提供回到上一页链接(//后是注释):

<%
sub WriteSuccessMsg(SuccessMsg) // 自定义函数,()中是外部传递的参数
dim strSuccess // 声明变量
strSuccess=strSuccess & "<html><head><title>成功信息</title><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>" & vbcrlf
// strSuccess为字符串变量,以下赋值语句皆为字符串累加赋值操作,将这些html代码累加在字符串strSuccess中,这些html代码定义了一个表格

......

strSuccess=strSuccess &"<tr align='center'bgcolor=lightblue><td><a href='javascript:hist ory.go(-1)'><<返回上一页</a></td></tr>"& vbcrlf
// 上段代码中的“& SuccessMsg &”部分,作用是将该函数取得的参数内容累加于strSuccess字符串中,即将其显示于表格之中。“<a href='javascript:hist ory.go(-1)'><<返回上一页</a>”定义了一个返回前一页的超链接。

......

response.write strSuccess
// 将字符串strSuccess输出,在客户端被浏览器解读为一个表格。
end sub
%>

<%
dim Msg // 声明变量
Msg="<font size=2>Response.Write输出成功,弹出定制窗口.</font>"
// 为变量赋值
Call WriteSuccessMsg(Msg)
// 将该变量作为参数传递给函数WriteSuccessMsg,并执行函数
%>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-10-16
sub WriteSuccessMsg(SuccessMsg)
...
end sub
这个表示过程,和函数的意思差不多,SuccessMsg表示过程形参

dim Msg '表示声明一个变量
Msg="<font size=2>Response.Write输出成功,弹出定制窗口.</font>" '表示为变量Msg赋值
Call WriteSuccessMsg(Msg) '表示调用过程WriteSuccessMsg
第2个回答  2019-10-23
简单一点的:封装为过程

<%

sub
write_table()

%>

<TABLE
class=thin
style='FONT-SIZE:
12px;
BACKGROUND:
#000'
cellSpacing=1
cellPadding=0
width='90%'
align=center
border=0>
.........

...........'你的HTML代码

........

</table>

<%

end
sub

%>

需要输出时:

<%

write_table()

%>
第3个回答  2019-03-06
response.write
"<TABLE
class=thin
style='FONT-SIZE:
12px;
BACKGROUND:
#000'
cellSpacing=1
cellPadding=0
width='90%'
align=center
border=0>"&_
"<TBODY>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
height=24>"&_
"<DIV
align=right>姓名:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'> </TD>"&_
"<TD
style='BACKGROUND:
#fff'>"&_
"<DIV
align=right>性别:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'> </TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=128
rowSpan=5>"&_
"<P
align=center><STRONG>照 片</STRONG>
</P></TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
bgColor=#999999
height=29>"&_
"<DIV
align=right>婚姻状况:</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=95> </TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=77
height=29>"&_
"<DIV
align=right>出生年月:</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=128> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
bgColor=#999999
height=27>"&_
"<DIV
align=right>学历:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=95
height=27> </TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=77>"&_
"<DIV
align=right>户籍:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=128> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79>"&_
"<DIV
align=right>专业:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=95
height=26> </TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=77>"&_
"<DIV
align=right>求职意向:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
width=128
height=26> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
bgColor=#999999
height=26>"&_
"<DIV
align=right>毕业学校:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=3> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
height=29>"&_
"<DIV
align=right>计算机能力:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=4> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
bgColor=#999999
height=26>"&_
"<DIV
align=right>语言能力:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=4> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
width=79
bgColor=#999999
height=32>"&_
"<DIV
align=right>教育培训:
</DIV></TD>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=4> </TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=5
height=27>"&_
"<P
align=center><STRONG>技能/专长</STRONG></P></TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
vAlign=top
colSpan=5
height=136>"&_
"<P
align=left><STRONG>相关技能:</STRONG></P></TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
colSpan=5
height=29>"&_
"<P
align=center><STRONG>工作经验</STRONG></P></TD></TR>"&_
"<TR>"&_
"<TD
style='BACKGROUND:
#fff'
vAlign=top
colSpan=5
height=90>"&_
"<P
align=left><STRONG>工作经历描述:
</STRONG></P></TD></TR></TBODY></TABLE>"
第4个回答  2020-06-28
这段代码的作用是页面上显示一个表格,提示成功信息,并提供回到上一页链接(//后是注释):
<%
sub
WriteSuccessMsg(SuccessMsg)
//
自定义函数,()中是外部传递的参数
dim
strSuccess
//
声明变量
strSuccess=strSuccess
&
"<html><head><title>成功信息</title><meta
http-equiv='Content-Type'
content='text/html;
charset=gb2312'>"
&
vbcrlf
//
strSuccess为字符串变量,以下赋值语句皆为字符串累加赋值操作,将这些html代码累加在字符串strSuccess中,这些html代码定义了一个表格
......
strSuccess=strSuccess
&"<tr
align='center'bgcolor=lightblue><td><a
href='javascript:hist
ory.go(-1)'><<返回上一页</a></td></tr>"&
vbcrlf
//
上段代码中的“&
SuccessMsg
&”部分,作用是将该函数取得的参数内容累加于strSuccess字符串中,即将其显示于表格之中。“<a
href='javascript:hist
ory.go(-1)'><<返回上一页</a>”定义了一个返回前一页的超链接。
......
response.write
strSuccess
//
将字符串strSuccess输出,在客户端被浏览器解读为一个表格。
end
sub
%>
<%
dim
Msg
//
声明变量
Msg="<font
size=2>Response.Write输出成功,弹出定制窗口.</font>"
//
为变量赋值
Call
WriteSuccessMsg(Msg)
//
将该变量作为参数传递给函数WriteSuccessMsg,并执行函数
%>
第5个回答  2019-07-21
把这段html代码封到一个函数里,然后调用那个函数写出就可以了