<html>
<head>
<title>Login Form</title>
<style type="text/css">
#apDiv1 {
position:absolute;
width:380px;
height:330px;
z-index:1;
left: 449px;
top: 136px;
background-image: url(gambar%20presentasi/024_lopez_cover2.gif);
border: 2px solid yellow;
}
#apDiv3 {
position:absolute;
width:80px;
height:25px;
z-index:2;
left: 289px;
top: 274px;
}
.style3 {
font-size: 10px;
font-weight: bold;
}
#apDiv2 {
position:absolute;
width:412px;
height:115px;
z-index:2;
top: 0px;
left: 2px;
}
#header{
width:380px;
height:98px;
background-image: url(gambar%20presentasi/47_-_Nena_Blagojev.jpg);
}
#footer{
width:380px;
height:40px;
background-image: url(bg1.jpg);
}
body {
background-image: url(gambar%20presentasi/___Baby_O____by_turp.jpg);
}
</style>
<script type="text/javascript">
function error1()
{
alert('Masukkan User Name dan Password Terlebih Dahulu ');
}
function check()
{
if(form1.pass.value == "" || form1.user.value=="")
{
error1();
}
}
</script>
</head>
<body onLoad="document.form1.user.focus();">
<form name="form1" method="post" action="check.php">
<div id="apDiv1">
<div id="header">
</div>
<div>
<div align="center"><strong><br>User Name :</strong>
<br>
<input type="text" name="user" size="35" value="" style="background-color:#FFCC99">
<br>
<br>
<strong>Password : </strong>
<br>
<input type="password" name="pass" size="35" style="background-color:#FFCC99">
<br>
<br>
</div>
</div>
<br>
<div id="apDiv3">
<input type="submit" name="submit" value=" E N T E R " onClick="check()">
</div>
<div id="footer" align="left"><br>
</div>
</div>
</form>
</body>
</html>
simpan dalam ekstensi .html
user name : dwi
password : 1964
output :
hasil validasi :