I want to send the user to a subpage on my website using js since it needs if/else statements. The js can send the user to youtube, twitter and other websites but it can't send the user to my subpage.. Please help
Here is the JS:
function myFormSubmit() {
myInput = document.getElementById('number');
if(myInput.value == 1) {
window.location.href = 'https://csgotradeup.org/tradeups/9324ec1'
alert(1);
}
}
Here is the HTML:
<div class="Searchbox">
<form onsubmit="myFormSubmit()">
<input type="number" class="input" placeholder="What is your budget?" min="0" id="number"
</form>
</div>