Omnibus commited on
Commit
9d7e788
1 Parent(s): 59c23e0

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +6 -16
index.html CHANGED
@@ -18,23 +18,13 @@
18
 
19
  while (i < linkz.length) {
20
  console.log(linkz[i]);
21
- // create a new div element
22
- const newDiv = document.createElement("div");
23
-
24
- // and give it some content
25
- const newContent = document.createTextNode(linkz[i]);
26
-
27
- // add the text node to the newly created div
28
- newDiv.appendChild(newContent);
29
-
30
- // add the newly created element and its content into the DOM
31
- const currentDiv = document.getElementById("div1");
32
- //document.body.insertBefore(newDiv, currentDiv);
33
- document.getElementById("in_html").innerHTML=newDiv
34
-
35
  i++;
36
-
37
-
38
  };
39
  //document.getElementById("in_html").innerHTML=links
40
  </script>
 
18
 
19
  while (i < linkz.length) {
20
  console.log(linkz[i]);
21
+ var a = document.createElement('a');
22
+ var linkText = document.createTextNode(linkz[i]);
23
+ a.appendChild(linkText);
24
+ a.title = linkz[i];
25
+ a.href = linkz[i];
26
+ document.getElementById("in_html").appendChild(a);
 
 
 
 
 
 
 
 
27
  i++;
 
 
28
  };
29
  //document.getElementById("in_html").innerHTML=links
30
  </script>