-
Notifications
You must be signed in to change notification settings - Fork 0
/
newfriend.html
48 lines (40 loc) · 1.47 KB
/
newfriend.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
<html>
<head>
<title>My New Friend</title>
</head>
<body>
<a href="home.html"><h1>Recommender System</h1></a>
<h1>New Friend Placed and Confirmed</h1>
<p>
<b>Your new friend was placed in your Friend List file. To share books with him, just click on his name in the list and
place the name of your book you want to share with the friend.</b>
</p>
<i id="f">Warriors</i><br>
<i id="t">Warriors</i><br>
<i id="g">Warriors</i><br>
<i id="s">Warriors</i><br>
<script>
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
var friendElement = document.getElementById('f');
friendElement.innerText = getParameterByName('f');
var teacherElement = document.getElementById('t');
teacherElement.innerText = getParameterByName('t');
var gradeElement = document. getElementById('g');
gradeElement.innerText = getParameterByName('g');
var schoolElement = document. getElementById('s');
schoolElement.innerText = getParameterByName('s');
</script>
<a href="mainfriendlist.html"><button>Main Friend List</button></a>
<a href="friendlist.html"><button>Add More Friends</button></a>
</body>
</html>