Update index.html
Browse files- index.html +6 -16
index.html
CHANGED
@@ -18,23 +18,13 @@
|
|
18 |
|
19 |
while (i < linkz.length) {
|
20 |
console.log(linkz[i]);
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
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>
|