Andrew Kolomiets,
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
form .hide
{
transform: scale(0);
transition: 1s;
}
form[action = "https://www.youtube.com/results"] .hide
{
transform: scale(1);
}
form[action = "https://www.youtube.com/results"] #youtube
{
display: none;
}
</style>
<script>
document.addEventListener( "DOMContentLoaded" , function() {
var button = document.getElementById("youtube");
var form = document.querySelector("form")
button.addEventListener("click", function() {
form.action = "https://www.youtube.com/results";
})
});
</script>
</head>
<body>
<form action="http://" >
<input name="search_query" value="coub" class="hide">
<button id="youtube" type="button">YouTube</button>
<button class="hide">search</button>
</form>
</body>
</html>