JSFiddle - React, Tailwind, and code Playground
HTML
<input id="one"><input id="two">
<button id="open">Open</button>
JavaScript
$('#open').click(function() {
var fixedData1 = 'http://www.google.com/#q=',
fixedData2 = '+',
userEntry1 = $('#one').val(),
userEntry2 = $('#two').val();
var newWindow = window.open(fixedData1 + userEntry1 + fixedData2 + userEntry2, '_blank');
newWindow.focus();
});