-
Notifications
You must be signed in to change notification settings - Fork 0
/
3rdpage.html
51 lines (43 loc) · 1.61 KB
/
3rdpage.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
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Comments</title>
</head>
<body
style="background-image:url('https://t4.ftcdn.net/jpg/02/92/20/37/360_F_292203735_CSsyqyS6A4Z9Czd4Msf7qZEhoxjpzZl1.jpg');background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;">
<div style="margin-top: 20% ;">
<div style="color: blanchedalmond;">
<div style="font-size: x-large;">
<h1 style="text-align: center;">Comments</h1>
<div style="text-align: center;">
<script>
// Get BMI from query parameter
const urlParams = new URLSearchParams(window.location.search);
const bmi = parseFloat(urlParams.get('bmi'));
// Display comments based on BMI value
if (bmi < 18) {
document.write("Diet Should include: Milk, Rice, Dried Fruits, Red Meat, Potatoes and Starch");
} else if (bmi > 24) {
document.write("Avoid: Sugar, Baked foods, Fried Foods, Bakery products, Maida, Soft drinks, alcohol. Include: Leafy greens, Oatmeals, Nuts, Legumes, Yogurts");
} else {
document.write("You may continue your diet plan");
}
</script>
</div>
</div>
</div>
</div>
</body>
</html>
<title>Document</title>
</head>
<body>
</body>
</html>