-
Notifications
You must be signed in to change notification settings - Fork 0
/
second_webpage.html
68 lines (57 loc) · 1.53 KB
/
second_webpage.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
<!DOCTYPE html>
<html>
<head>
<title>Stored Login Data</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
h1 {
text-align: center;
margin-bottom: 20px;
}
table {
width: 100%;
border-collapse: collapse;
}
th, td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #ddd;
}
th {
background-color: #f2f2f2;
}
tr:nth-child(even) {
background-color: #f9f9f9;
}
</style>
</head>
<body>
<h1>Stored Login Data</h1>
<table id="loginTable">
<tr>
<th>ID</th>
<th>Email</th>
<th>Password</th>
</tr>
</table>
<script>
var encodedData = window.location.search.substring(1);
var decodedData = decodeURIComponent(encodedData);
var loginDataArray = JSON.parse(decodedData);
var table = document.getElementById('loginTable');
for (var i = 0; i < loginDataArray.length; i++) {
var loginData = loginDataArray[i];
var newRow = table.insertRow();
var idCell = newRow.insertCell();
var emailCell = newRow.insertCell();
var passwordCell = newRow.insertCell();
idCell.innerHTML = i + 1;
emailCell.innerHTML = loginData.email;
passwordCell.innerHTML = loginData.password;
}
</script>
</body>
</html>