exp6surya
exp6surya
1.3 Apparatus: Desktop or Laptop with any operating system like UNIX,
LINUX and Windows.
1.4 Software: Notepad or Notepad++ or Visual Studio Code and any web
Browser like Internet Explorer, Goggle Chrome, and Mozilla Firefox etc .
1.5 Procedure:
<html>
<head>
<link rel="stylesheet" href="login.css">
<script src="login.js"></script>
</head>
<body>
<div class="box">
<img src="kl_logo Background Removed.png"><br>
<label style="color:rgb(78, 250, 4);"><h1>LOGIN PAGE</h1></label>
<font color="white">USER NAME:</font><input type="text" name="name"
id="logName" required><br><br>
<font color="white">PASSWORD:</font><input type="password"
name="password" id="logPassword" required>
<br><br><input type="submit" value="LOGIN" onclick="onbuttonclick()">
</div>
</body>
</html>
JAVASCRIPT
function onbutton()
{
var usid=document.getElementById("logName").Value;
var psw=document.getElementById("logPassword").Value;
alert(usid);
alert(psw);
if(usid=="surya" && psw=="varma"){
alert("login approved");
}
else{
alert("wrong password");
}
}
CSS(CASCADING STYLE SHEETS)
body {
background-image: url(https://cdn.vectorstock.com/i/500p/93/46/abstract-
gradient-background-with-circles-striped-vector-54489346.jpg);
background-repeat:no-repeat ;
background-attachment:scroll;
background-size: cover;
}
.box{
background-color:rgba(21, 20, 21, 0.649);
align-content: center;
width: 380px;
height: 500px;
padding: 20px;
margin: 8% auto 0;
text-align: center;
position: relative;
box-sizing: border-box;
flex-direction: column;
}
.box img{
width:100px;
margin-top:-50px ;
1.6 Result: