.net中函数介绍实例2
2005-03-16 13:03
549 查看
<%@ Page Language="c#" %>
<script runat="server">
void Page_Load()
{
message1.Text="";
message1.Text+="<BR />Calling Function 1...";
Function1();
message1.Text+="<BR />Calling Function 2...";
Function2();
message1.Text+="<BR />Calling Function 1...";
Function1();
}
void Function1()
{
string Different =
"<i>Hello I'm the variable Different in Function 1</i>";
message1.Text+= Different;
}
void Function2()
{
string Different =
"<b>Hello I'm the variable Different in Function 2</b>";
message1.Text+= Different;
}
</script>
<html>
<head>
<title>Scope</title>
</head>
<body>
<asp:Label id="message1" runat="server"></asp:Label>
</body>
</html>
<script runat="server">
void Page_Load()
{
message1.Text="";
message1.Text+="<BR />Calling Function 1...";
Function1();
message1.Text+="<BR />Calling Function 2...";
Function2();
message1.Text+="<BR />Calling Function 1...";
Function1();
}
void Function1()
{
string Different =
"<i>Hello I'm the variable Different in Function 1</i>";
message1.Text+= Different;
}
void Function2()
{
string Different =
"<b>Hello I'm the variable Different in Function 2</b>";
message1.Text+= Different;
}
</script>
<html>
<head>
<title>Scope</title>
</head>
<body>
<asp:Label id="message1" runat="server"></asp:Label>
</body>
</html>
相关文章推荐
- VC音频函数的介绍-附实例
- Linux下C语言之操作字符串函数介绍及实例之一
- 基于DDD的.NET开发框架ABP实例,多租户 (Sass)应用程序,采用.NET MVC, Angularjs, EntityFramework-介绍
- pthread_join函数介绍和使用实例
- VC音频函数的介绍-附实例
- linux C socket函数介绍和使用实例
- javascript中bind函数的作用实例介绍
- Linux Shell 流程控制语句实例及自定义函数介绍
- pandas常用功能与函数介绍(结合实例,持续更新)
- [SQL SERVER系列]之常用函数和开窗函数介绍及实例
- SQl Function 创建函数实例介绍
- Json.Net系列教程 1.Json.Net介绍及实例
- 基于DDD的.NET开发框架ABP实例,多租户 (Sass)应用程序,采用.NET MVC, Angularjs, EntityFramework-介绍
- [SQL SERVER系列]之常用函数和开窗函数介绍及实例
- 基于DDD的.NET开发框架ABP实例,多租户 (Sass)应用程序,采用.NET MVC, Angularjs, EntityFramework-介绍
- .net中函数的使用实例
- .net多线程的总结和实例介绍
- PowerShell函数中的开关参数介绍和创建实例
- SQl Function 创建函数实例介绍
- 基于DDD的.NET开发框架ABP实例,多租户 (Sass)应用程序,采用.NET MVC, Angularjs, EntityFramework-介绍