JSFiddle - React, Tailwind, and code Playground
HTML
<form method="get" id="search" target="_blank">
<select id="space">
<option value='["https://google.com/search","q"]'>интернет</option>
<option value='["https://www.youtube.com/results","search_query"]'>youtube</option>
</select>
<input type="text" id="text">
<input type="submit" onClick="search_in();">
</form>
JavaScript
function search_in()
{
var space = document.getElementById('space').value;
space = JSON.parse(space);
document.getElementById('search').action = space[0];
document.getElementById('text').name = space[1];
}