JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" name="key" id="key" />
<span class="new_url">Go</span>
CSS
.new_url{
padding: 2px 8px;
background: #BBB;
cursor: pointer;
}
JavaScript
$(function(){
$(".new_url").on("click", function(){
textboxpw = document.getElementById("key");
url = encodeURIComponent('http://website.com?secret='+textboxpw.value);
window.open(url, '_blank');
});
});