Skip to content

prakweb login

March 23, 2011
tags:
Source Code :
<!DOCTYPE html >
<head>
<title>Login</title>
<style type="text/css">
#form{
margin-top:180px;
margin-left:450px;
font-family: arial;
font-size: 20px;
color:#CCCCCC;
width:350px;
height : 250px;
background:#333333;
border: 3px solid #000000;
}
#btnLogin{
margin-left:100px;
}
#Input{
margin-top: 30px ;
margin-left: 100px ;
margin-bottom: 10px;
font-family: calibri;
font-size: 15px;
color:#CCCCCC;
}

</style>
</head>

<body>
<script language="JavaScript" type="text/javascript">
function checkUserName(v) {
    re = /^\D{3,}$/;
    return re.test(v);
}
function checkPass(v) {
    re = /^\D{3,}$/;
    return re.test(v);
}
function checkForm(f) {
    if (!checkUserName(f.username.value)) {
        alert("Username Kosong!");
        f.username.focus();
        return false;
    }
    if (!checkPass(f.password.value)) {
        alert("Password Kosong!");
        f.pin.focus();
        return false;
    }
    return true;
}
</script>
<div id="form">
<h2 align="center">Login</h2>
<hr style="color:#000000; border:double;" align="center" width="300"/>
<form  method="POST" NAME="input" onSubmit="return checkForm(this)">
   <div id="Input">
   Username:<br />     <input type="text" name="username"/><br />
   Password:<br />     <input type="password" name="password"/><br />
   </div>
   <div id="btnLogin">
   <input type="submit" name="Login" value="Login">
    </div>
</form>
</div>
</body>
</html>
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: