ASP中过程的使用

发布时间:2007-03-06 20:53:00 阅读:1248次

1.asp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
Sub s1(str1,n1,n2,str2)
  str2=mid(str1,n1,n2)
End sub
%>
<%
call s1("abcdefg",1,3,a)
response.write a
response.write "<br>"
%>


<%
Sub s2(str1,n1,n2)
  dim str2
  str2=mid(str1,n1,n2)
  response.write str2
End sub
%>
<%
call s2("abcdefg",1,3)
%>

 

</body>
</html>

 

2.asp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
Sub s1(str1,n1,n2,str2)
  str2=mid(str1,n1,n2)
End sub
%>
<%
call s1("abcdefg",1,3,a)
response.write a
response.write "<br>"
%>


<%
Sub s2(str1,n1,n2)
  dim str2
  str2=mid(str1,n1,n2)
  response.write str2
End sub
%>
<%
call s2("abcdefg",1,3)
%>


<%
Sub Createtab(width,n3,n4,border,align,color,cellspacing,cellpadding,name)
    width="&width&" border="&border&" align="&align&" bordercolor="&color&" cellspacing="&cellspacing&" cellpadding="&cellpadding&">"
    for i=1 to n3
    "<tr>"
    for j=1 to n4
    "<td>"&i&j&"</td>"
 next
 name=name& "</tr>"
 next
 name=name&  "<table>"
End sub
%>
<%
call  Createtab("50%",2,4,1,"center","green",0,1,n1)
response.write n1
%>

 

<%
call  Createtab("100%",1,2,1,"left","black",4,4,n2)
response.write n2
%>


</body>
</html>

如有问题,可以QQ搜索群1028468525加入群聊,欢迎一起研究技术

支付宝 微信

有疑问联系站长,请联系QQ:QQ咨询
下一篇:ASP+XMLHTTP

转载请注明:ASP中过程的使用 出自老鄢博客 | 欢迎分享