-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbook.html
More file actions
112 lines (106 loc) · 3.09 KB
/
book.html
File metadata and controls
112 lines (106 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<html lang="en" dir="ltr">
<head>
<style>
.x{
display:flex;
align-content: center;
margin: 40px ;
}
.x > div{
background-color: #f1f1f1;
width: 350px;
margin: 0px 30px 20px 400px;
border: 2px solid #f1f1f1;
border-radius: 25px;
padding:30px;
font-size: 30px;
text-align: justify;
}
body{
background-image: url(rail.jpg);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
font-size:20px;
padding: 50px;
text-align: center;
font-family: Gill Sans MT;
border-width: medium;
border-color: #2f2f8f;
}
select,input[type=date],input[type=number],input[type=time]{
background-color: #c4c4df;
border-color: #6d6db0;
border-style: groove;
text-align: center;
font-size:20px;
}
p{
font-family: Gill Sans MT;
font-size:20px;
text-align: center;
}
</style>
</head>
<body>
<div class="x">
<div>
<form>
<label id="d1" for="from">From :</label>
<select>
<option>New Delhi</option>
<option>MGR Chennai Central Jn.</option>
<option>Tatanagar Jn.</option>
</select>
<br>
<label id="d2" for="to">To :</label>
<select>
<option>Bengaluru Jn.</option>
<option>Kanpur Jn.</option>
<option>Bhopal Jn.</option>
</select>
<br>
<label id="d3" for="Coach">Coach No :</label>
<select>
<option>H1</option>
<option>A1</option>
<option>B1</option>
<option>B2</option>
</select><br>
<label id="d3" for="train">Train Name :</label>
<select>
<option>Utkal Express</option>
<option>Rajdhani Express</option>
<option>Double Decker Express</option>
<option>Shatabdhi Express</option>
</select>
<br>
Date:<input type="date" min="2020-09-08" max="2021-01-31" name="date" value="" required> <br>
Time In :<input type="time" name="" value="" required>
<br>
Male Passengers: <input type="number" style="width:40px;" min=1 id="mp" value="0" required><br>
Female Passengers: <input type="number" style="width:40px;" min=0 id="fp" value="0" required>
<br>
<br>
<br><input type="button" onclick="check()" value="Submit">
<input type="reset" value="Reset">
<p id='tnt'><p>
</div>
</div>
<script>
function check()
{
var mp=document.getElementById('mp').value;
var fp=document.getElementById('fp').value;
if((Number(mp)+Number(fp))>5)
{
document.getElementById('tnt').innerHTML="<p style='color:red;'>Booking not possible!Check for Availibilty</p>";
}
else
{
document.getElementById('tnt').innerHTML="<p style='color:green;'>Booking Confirmed</p>";
}
}
</script>
</body>
</html>