JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<input type="text" id="myInput" />
<script>
const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('s');
document.getElementById('myInput').value = myParam;
</script>
</body>
</html>