JSFiddle - React, Tailwind, and code Playground
by fredd man
HTML
<div class="info">
<input class="input" type="text" id="searchFor" name="someNameHere" />
<input id="sent" class="sent" type="submit" value="Search" onclick="searchYT()" />
</div>
CSS
.info {
display: table-cell;
white-space: nowrap;
}
.input {
font-size: 22px;
width: 200px;
margin-top: 40px;
background: #000000;
color: #0059dd;
}
.sent {
font-size: 22px;
background: black;
color: #0059dd;
cursor: pointer;
font-family: "Times New Roman", Times, serif;
}
JavaScript
function searchYT() {
const searchFor = document.getElementById("searchFor").value;
("https://www.youtube.com/results?search_query=" + searchFor);
}