-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.js
More file actions
19 lines (15 loc) · 701 Bytes
/
Copy pathemail.js
File metadata and controls
19 lines (15 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
document.getElementById("email_addr_confirm").addEventListener("input", verifyEmail);
document.getElementById("airspeed_velocity").addEventListener("input", showAirspeed);
function verifyEmail(input) {
input = input.srcElement;
if (input.value != document.getElementById('email_addr').value) {
input.setCustomValidity('The two email addresses must match.');
} else {
input.setCustomValidity('');
}
input.nextElementSibling.innerText = input.validationMessage;
}
function showAirspeed(input) {
input = input.srcElement;
document.getElementById("asv").innerText = input.valueAsNumber;
}