venom1996,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<input name="" type="button" value="Go">
<script>
document.querySelector('[type="button"]').addEventListener( "click" , function(event) {
event.preventDefault();
let validate = [...document.querySelectorAll('[type="text"]')].every(({value}) => value.trim());
if(validate) location = "https://ya.ru";
else alert("одно или несколько полей незаполнено");
});
</script>
</body>
</html>