I have the following code below, that supposed to pass on value from one HTML page to another. The code works fine with Firefox, but it is not working for IE 11. Could you please tell me why the code is not working? Thanks in advance
FORM.HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>OrderUp</title>
</head>
<body>
<form method="get" action="results.html" >
Name : <input name = "name" type= "text" id="name">
<br>
<input value = "Submit" type = "submit" >
</form>
</body>
</Html>
RESULTS.HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Results</title>
</head>
<body>
<h2> Your Form Has Been Submitted </h2>
<div class = "first"> Name: </div>
<script>
let params = (new URL(document.location)).searchParams;
let name = params.get("name");
console.log(name)
document.querySelector('.first').innerText += name;
</script>
</body>
</html>