Right now even if input fields are empty , if submit button is pressed it shows alert"message": and then redirects to window.location="URL"
What I m looking for is it only shows done alert and redirects if input fields are filled
<form>
<input type="text" placeholder="enter name here">
<input type="number" placeholder="enter number here">
<input type="submit" id="submitbutton" value="submit">
</form>
</center>
</body>
<script type="text/javascript">
const submitit = document.getElementById('submitbutton');
submitit.addEventListener("click",function(){
alert("Done, Meanwhile check our website");
window.location="https://www.google.com";
});
</script>