-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrestore.js
34 lines (22 loc) · 1013 Bytes
/
restore.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
34
function codeAddress(){
var numbd1 = 0;
todolist = JSON.parse(localStorage.getItem("todos"));
for(x of todolist){
numidb = numidb + 1;
numidp = numidp - 1;
var parag = document.createElement("P");
var button = document.createElement("BUTTON");
var divd = document.getElementById("potatoes");
var idstrb = numidb.toString();
var idstrp = numidp.toString();
button.setAttribute("onclick", "reply_click(this.id)");
button.setAttribute("id", idstrb);
button.setAttribute("class", 'todobutton');
parag.setAttribute("id", idstrp);
parag.setAttribute("class", "todotext");
parag.innerText = x;
document.getElementById('potatoes').appendChild(parag);
document.getElementById('potatoes').appendChild(button);
}
}
window.onload = codeAddress();