add name as query parameter

This commit is contained in:
lelgenio 2024-10-06 12:21:27 -03:00
parent b206caa7b7
commit 64e7876233

View file

@ -33,8 +33,16 @@
</head>
<body>
<div class="col">
<span>I'm sorry, but...</span>
<span>I'm sorry, <span id="name"></span> but...</span>
<h1>You're Wrong</h1>
</div>
<script>
const nameSpan = document.getElementById("name");
let name = (new URLSearchParams(window.location.search)).get("name");
if (name) {
nameSpan.innerHTML = name;
}
</script>
</body>
</html>