Sei sulla pagina 1di 6

Vivek Jadaun

07414802714
6C2
Experiment-15
Aim- To create a website requiring user authentication.

vivek.html
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Cinzel|Philosopher" rel="stylesheet">
<style>
h1{
text-transform: uppercase;
margin: 50px;
font-weight: bolder;
font-family: 'Cinzel', serif;
}
table{
margin: auto;
font-size: 18px;
font-weight: bold;
padding-bottom: 15px;
}
td{
text-align: right;
padding-right: 8px;
font-family: 'Philosopher', sans-serif;
}
*{
text-align: center;

}
</style>
<title>Home</title>
<h1> Enter Your Credentials</h1>
</head>

<script>
function validate(){
var email=document.getElementById("em").value;
if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email)){
return true;
}
else{
alert("Invalid email id!");
return false;
}
var num=document.getElementById("mob").value;
if(/^\d{10}$/.test(num)) {
Vivek Jadaun
07414802714
6C2
return true;
}
else{
alert("Invalid mobile number!");
return false;
}
}
</script>
<body>
<div>
<form action="choice.html" id="credentials" onsubmit="return validate()" method="post">
<table name="tb">
<tr>
<td>Email id</td>
<td><input type="text" id="em" required /></td>
</tr>
<tr>
<td>Username</td>
<td><input type="text" id="usr" /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" id="pwd" required/></td>
</tr>
<tr>
<td>Mobile No.</td>
<td><input type="number" id="mob" required/></td>
</tr>
</table>
<input type="submit" value="Login" style="color: white; font-family: 'arial'; font-size: 15px; border:
2px offset black; background: dodgerblue"/>
</form>
</div>
</body>
</html>

choice.html
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Cinzel|Philosopher" rel="stylesheet">
<style>
h1{
font-family: 'Cinzel', serif;
}
table{
margin: auto;
}
Vivek Jadaun
07414802714
6C2
td{
border: 1px solid black;
font-family: 'Philosopher', sans-serif;
}
a{
text-decoration: none;
}
*{
box-sizing: border-box;
padding: 5px 10px 5px 10px ;
text-align: center;
}
</style>
<title>Choices</title>
<h1>Select a movie of your choice</h1>
</head>
<body>
<table>
<tr style="font-weight: bold">
<td>Movie</td>
<td>Genre</td>
<td>Year of Release</td>
<td>Imdb Rating</td>
<td>Trailer</td>
</tr>
<tr>
<td>Kong:Skull Island</td>
<td>Action,Adventure,Fantasy</td>
<td>2017</td>
<td>7/10</td>
<td><a href="http://www.imdb.com/title/tt3731562/" target="_blank">Watch Trailer</a></td>
</tr>
<tr>
<td>Fate of the Furious</td>
<td>Action,Crime,Thriller</td>
<td>2017</td>
<td>7.5/10</td>
<td><a href="http://www.imdb.com/title/tt4630562/?ref_=fn_al_tt_2" target="_blank">Watch
Trailer</a></td>
</tr>
<tr>
<td>The Boss Baby</td>
<td>Animation,Comedy,Family</td>
<td>2017</td>
<td>6.4/10</td>
<td><a href="http://www.imdb.com/title/tt3874544/?ref_=india_t_glfull" target="_blank">Watch
Trailer</a></td>
Vivek Jadaun
07414802714
6C2
</tr>
<tr>
<td>Logan</td>
<td>Action,Drama,Sci-Fi</td>
<td>2017</td>
<td>8.5/10</td>
<td><a href="http://www.imdb.com/title/tt3315342/" target="_blank">Watch Trailer</a></td>
</tr>
<tr>
<td>Zootopia</td>
<td>Animation,Comedy,Family</td>
<td>2016</td>
<td>8.1/10</td>
<td><a href="http://www.imdb.com/title/tt2948356/" target="_blank">Watch Trailer</a></td>
</tr>
</table>
</body>
</html>

OUTPUT
Vivek Jadaun
07414802714
6C2
Vivek Jadaun
07414802714
6C2

Potrebbero piacerti anche