File size: 1,240 Bytes
4d2184b 1153769 4d2184b 13da775 c4268a5 4768d99 a734d2d e4d7293 46847be 13da775 4d2184b |
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 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>My static Space</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="card" id = "in_html" name="in_card">
</div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
const links = urlParams.get("links");
const linkz= links.split(",");
let i = 0;
while (i < linkz.length) {
console.log(linkz[i]);
i++;
// create a new div element
const newDiv = document.createElement("div");
// and give it some content
const newContent = document.createTextNode(linkz[i]);
// add the text node to the newly created div
newDiv.appendChild(newContent);
// add the newly created element and its content into the DOM
const currentDiv = document.getElementById("div1");
document.body.insertBefore(newDiv, currentDiv);
};
document.getElementById("in_html").innerHTML=links
</script>
</body>
</html>
|