Javascript : Url Redirection after form submission

I have the following newsletter Mailchimp form:

<div class="mc4wp-form-fields"><p>
    <label>Email: 
        <input type="email" name="EMAIL" placeholder="" required="">
</label>
</p>

<p>
    <input type="submit" value="Subscribe">
</p></div>

I need when someone clicks on the subscribe button, after 2 seconds to redirect in a new URL in a new tab. For example www.youtube.com

How is this possible to happen using javascript?

Answer

Change your button with following code, then put myFunction() function code in your file.

<input id="button" type="submit" name="button" onclick="myFunction();" value="Subscribe"/>


<script>
function myFunction(){
    setTimeout(function () { window.location = "www.youtube.com" }, 2000);
};   
</script>