.COM과.NET

Hagi 2012. 8. 28. 17:06

<%@ Page Language="C#" AutoEventWireup="true" Inherits="Login_Login" CodeFile="Login.aspx.cs" %>
<!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 runat="server">

</head>

<script type="text/javascript">
function chkvalue() {
var adminid = document.getElementById("<%= adminid.ClientID %>");
if (adminid.value == "") {
adminid.focus();
return true;
}
var pswd = document.getElementById("<%= pswd.ClientID %>");
if (pswd.value == "") {
pswd.focus();
return true;
}
return false;
}
</script>

<body>
<form id="form1" > 
 
<fieldset>
   <label><img src="/images/id.gif" alt="아이디" />  
  <asp:TextBox ID="adminid" runat="server></asp:TextBox>
</label>
  <label><img src="/images/pw.gif" alt="비밀번호" />
  <asp:TextBox ID="pswd" runat="server" TextMode="Password" ></asp:TextBox>
   </label>  
  <div><asp:ImageButton ID="btnSubmit" runat="server" ImageUrl="/images/login.gif" onClick="btnSubmit_Click" OnClientClick= "if (chkvalue()) { return false;};"/></div>  
</fieldset>
   
   
</form>
</body>
</html>