-
Notifications
You must be signed in to change notification settings - Fork 0
/
h1js.js
46 lines (33 loc) · 1.7 KB
/
h1js.js
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
function validation(){
localStorage.setItem("Height", document.getElementById('Height').value);
localStorage.setItem("Weight", document.getElementById('Weight').value);
localStorage.setItem("Systolic", document.getElementById('Systolic').value);
localStorage.setItem("Diastolic", document.getElementById('Diastolic').value);
if (document.getElementById('Age').value==""
|| document.getElementById('Age').value==undefined)
{
alert ("Please Enter Your Age");
}
else if (document.getElementById('Height').value==""
|| document.getElementById('Height').value==undefined)
{
alert ("Please Enter Your Height");
}
else if(!document.getElementById('1').checked && !document.getElementById('2').checked) {alert ("Please Enter Your Gender");}
else if (document.getElementById('Weight').value==""
|| document.getElementById('Weight').value==undefined)
{
alert ("Please Enter Your Weight");
}
else if (document.getElementById('Systolic').value==""
|| document.getElementById('Systolic').value==undefined)
{
alert ("Please Enter Your Systolic Blood Pressure");
}
else if (document.getElementById('Diastolic').value==""
|| document.getElementById('Diastolic').value==undefined)
{
alert ("Please Enter Your Diastolic Blood Pressure");
}
else{location.href = 'next.html';}
}