Tell me what line i can add to this code so that it can redirect to another page in javascript?

This redirects to new page specified always the form is submitted either by validation is confirmed or without. I want it to be redirected after it is confirmed. Help me out with this

<form name="studentDetails" onsubmit="validate()" method="POST" action="successRegistration.html">
            <table>
                <tr>
                    <td><label for="name">Student Name&colon;</label></td>
                    <td><input type="text" id="name"/></td>
                </tr>
                <tr>
                    <td><label for="password">Student Password&colon;</label></td>
                    <td><input type="password" id="password"/></td>
                </tr>
                <tr>
                    <td><label for="age">Student Age&colon;</label></td>
                    <td><input type="text" id="age" minlength="2" maxlength="2"/></td>
                </tr>
                <tr>
                    <td><label for="gender">Gender&colon;</label></td>
                    <td><input type="radio" name="gender" id="gender" value="M"/>Male</td>
                    <td><input type="radio" name="gender" id="gender" value="F"/>Female</td>
                </tr>
            </table><br/>
            <input type="submit" value="Register"/>
        </form>