-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
33 lines (30 loc) · 797 Bytes
/
App.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
document.getElementById("btn").addEventListener("click",referpage)
function referpage(){
updateData();
window.location.href="discussion.html"
}
function updateData(){
var com_div=document.getElementById("community-contents");
var div=document.createElement("div");
var data=`
<div class="content-flex-col">
<div class="flex-row-content">
<div>
<a class="anc" href="">${localStorage.getItem("title")}</a>
<P>${"By Anshu"}</P>
</div>
<div>
<p>${localStorage.getItem("topic")+"/Announcements"}</p>
</div>
<div>
<p>${Math.floor(Math.random()*10)}</p>
</div>
<div>
<p>${Math.floor(Math.random()*50)}</p>
</div>
</div>
</div>`;
div.innerHTML=data;
com_div.append(div);
}
updateData();