<html>
<title>第八例  HtmlImage和HtmlInputButton控件使用</title>
 <head>
 
    <script language="VB" runat="server">

	Sub SubmitBtn_Click(Source As Object, E as EventArgs)
         If (Name.Value = "cm") And (Password.Value = "991") Then
            Message.InnerHtml = "恭喜您，帐号、密码输入正确！"
		Image1.Src = "image1.gif"
	       	Image1.Height = 45
        	Image1.Width = 45
	        Image1.Border = 2
        	Image1.Align = "left"
	        Image1.Alt = "图片 1"
         Else
            Message.InnerHtml = "帐号和密码错误，请您检查您的输入！"
		Image1.Src = "image2.gif"
    		Image1.Height = 45
	        Image1.Width = 45
        	Image1.Border = 5
	        Image1.Align = "right"
        	Image1.Alt = "图片 2"
         End If
      End Sub

      Sub ResetBtn_Click(Source As Object, E as EventArgs)
         Name.Value = ""
         Password.Value = ""
      End Sub

  
  </script>
 
 </head>
 
 <body>

    <form runat="server">
       <h3><font face="Verdana">第八例  HtmlImage和HtmlInputButton控件使用</font></h3>
            <center> 
   <blockquote>
	输入您的用户名: 
         	<input id="Name" 
                    type=text size=40 runat="server"> 
        <BR>
	<BR>     
	输入您的密  码:
		<input id="Password" 
                    type=password size=40 runat="server"> 
		<BR>
		<BR>
               <input type=submit value="确认输入"
                    OnServerClick="SubmitBtn_Click" runat="server">
             <input type=reset value="重新输入"
                    OnServerClick="ResetBtn_Click" runat="server">
             <h1>
             <span id="Message" runat="server"> </span> 
             </h1>
  
       </center>
       
       <br><br>
      <img id ="Image1"
            Src="image3.gif"
            Width="290"
            Height="60"
            Alt="Image 1"
            Border="1"
            Align="center" 
            runat=server/>
	<br>
  </blockquote> 	  
    </form>

 </body>
 </html>