-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathVAL.html
101 lines (89 loc) · 4.17 KB
/
VAL.html
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
<!DOCTYPE html>
<html>
<head>
<style>
.top{ position: relative;background-color: rgba(101, 219, 221, 0.37);text-align: center;border-left:25px solid rgb(10, 88, 133);
margin-bottom:9px;margin-left: 15px;margin-top:-20px ;font-size: 22px;color: rgba(29, 180, 240, 0.993); height: 50px;width:1425px;
border-right:25px solid rgb(10, 88, 133);}
.bot{ position: relative;background-color: rgba(161, 178, 179, 0.37);text-align: center;border-left:25px solid rgba(8, 116, 8, 0.76);
margin-bottom:9px;margin-left: 15px;margin-top:-20px ;font-size: 22px;color: rgb(27, 180, 60); height: 50px;width:1425px;
border-right:25px solid rgb(8, 116, 8, 0.76);}
body { font-family: Arial, Helvetica, sans-serif; background-size:1539px 769px}
.topright{
background-color:rgba(202, 199, 199, 0.562);position: absolute; top: 100px; right:550px; font-size: 30px; height: 550px; width:30%;margin-left: 80px;margin-top: 30px;
}
form{margin-left: 10px; padding: 1px ; size: 20px; font-size: 25px;}
input[type=text], input[type=option] { width: 50%; padding: 10px; margin: 0px 0 10px 0; border: none; background: #f1f1f1; }
input[type=email]:focus, input[type=submit]:focus { background-color: #ddd; outline: none;}
</style>
</head>
<body background="Five.jpg">
<div class="top">
<h1>CAR RENTAL SYSTEM</h1>
</div>
<div class="bot">
<h1>FAIR CALCULATE</h1>
</div>
<div class="topright">
<form name="myform" onsubmit="return(valid());">
<center><b style="font-size: 25px;color: rgb(83, 13, 175);">ENTER PARTICULARS</b><BR></center><br>
No of days:
<input type="text" name="days" id="d1" size="30"/>
Choose Brand:
<select name="car" id="c1">
<option value="-1" selected>[Choose yours]</option>
<option value="1">Ford</option>
<option value="2">Toyota</option>
<option value="3">Mahindra</option>
<option value="4">Scoda</option>
<option value="5">Hyundai</option>
<option value="6">Chevorlet</option>
</select><br><br>
Delivery location:
<input type="text" name="del" id="d2" size="30"/><br>
Delivery date:
<input type="date" name="del" id="d3" size="30"/><br>
<br>Return location:
<input type="text" name="re" id="d4" size="30"/><br>
Return Date:
<input type="date" name="del" id="d5" size="30"/><br><br><br>
<center><input type="submit" value="submit"/></center>
</form>
</div>
<script>
function valid()
{
var x,y,z,a;
x=document.getElementById("d2").value;
y=document.getElementById("d4").value;
a=document.getElementById("d1").value;
if(document.getElementById("d1").value=="")
{
alert("Please enter number of days!");
document.getElementById("d1").focus();
return false;
}
if(document.getElementById("d2").value=="")
{
alert("Please enter delivery location!");
document.getElementById("d1").focus();
return false;
}
if(document.getElementById("d4").value=="")
{
alert("Please enter return location!");
document.getElementById("d1").focus();
return false;
}
if(document.getElementById("c1").value=="-1")
{
alert("Choose any company !");
document.getElementById("d1").focus();
return false;
}
z=2500*a;
alert("Estimated fare from " + x +" to "+ y + " is ₹ " + z);
}
</script>
</body>
</html>