More actions
<input type="text" id="urlInput" placeholder="Enter URL"> <button onclick="redirectToInputURL()">Go</button>
<script> function redirectToInputURL() { var inputUrl = document.getElementById("urlInput").value; if (inputUrl.trim() !== "") { window.location.href = "http://example.com/" + encodeURIComponent(inputUrl); } } </script>