您的位置:首页 > 其它

.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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: