JSFiddle - React, Tailwind, and code Playground
HTML
Give Url:<br>
<input type="url" placeholder="http://www.example.com"><br>
<button type="button">Open Url</button>
JavaScript
let tb = document.querySelector("input"); // Get a reference to the textbox
// Get a reference to the button and set up the click event handler for it
document.querySelector("button").addEventListener("click", function () {
var win = window.open(tb.value);
});