I want to direct the button to another page
function showInput() {
document.getElementById("demo").innerHTML = '<input type="submit"
onclick="location.href = "addnewcustomer.php";" id ="newcust"
class="btnRegister" value = "New Customer">';
}
I want when i click the New Customer button, it will redirect to addnewcustomer.php but when i run the code, nothing happened.
There are no errors. Just the button didn't function the way i want it to