案例:ASP.NET案例     状态:不可编辑再运行    进入竖版
 运行结果 
x
 
1
2
<script  runat="server">
3
Sub button1(Source As Object, e As ImageClickEventArgs)
4
      p1.InnerHtml="You clicked the on button!"
5
End Sub
6
Sub button2(Source As Object, e As ImageClickEventArgs)
7
      p1.InnerHtml="You clicked the off button!"
8
End Sub
9
</script>
10
11
<html>
12
<body>
13
14
<form runat="server">
15
<p>请点击其中的一幅图片:</p>
16
<p>
17
<input type="image" src="/img/eg_bulbon.gif"
18
OnServerClick="button1" runat="server" width="45" height="60" />
19
</p>
20
<p>
21
<input type="image" src="/img/eg_bulboff.gif"
22
OnServerClick="button2" runat="server" width="45" height="60" />
23
</p>
24
<p id="p1" runat="server" />
25
</form>
26
27
</body>
28
</html>
29