-
Notifications
You must be signed in to change notification settings - Fork 0
/
otherpage.html
45 lines (36 loc) · 1.17 KB
/
otherpage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Other Page</title>
<!-- code by: Rahul patel (2203031300025) gudience:gdscpu -->
<style>
/* Styling for the data container and logout button */
#data-container {
border: 2px solid #4CAF50;
background-color: #f8f8f8;
padding: 20px;
margin: 20px;
font-family: Arial, sans-serif;
color: #333;
}
</style>
</head>
<body>
<!-- code by: Rahul patel (2203031300025) gudience:gdscpu -->
<div id="data-container"></div>
<script>
// Retrieve data from localStorage
const otplessUserData = localStorage.getItem('otplessUserData');
// Display the data in the container
const dataContainer = document.getElementById('data-container');
dataContainer.innerHTML = `<h2>USER's INFO</h2><pre>${otplessUserData}</pre>`;
// Add click event listener to the logout button
document.getElementById('logout-button').addEventListener('click', function() {
// Clear localStorage
localStorage.removeItem('otplessUserData');
});
</script>
</body>
</html>