link button to textfield code example
Example: link button to textfield
const ageInput = document.querySelector('#age-input');
ageInput.valueAsDate = new Date();
document.querySelector('#Bt-Submit').onclick = function()
{
let Age = new Date( new Date() - ageInput.valueAsDate ).getFullYear() - 1970;
console.log(Age);
if ( Age < 21 ) { document.location.href = "https://disney.com" }
}
document.querySelector('#Bt-Reset').onclick = function()
{
ageInput.valueAsDate = new Date();
}