-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemail.html
More file actions
12 lines (12 loc) · 732 Bytes
/
email.html
File metadata and controls
12 lines (12 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
---
layout: page
title: "basic email validator template"
permalink: /email
---
<html lang="en"><h1>basic email validator template</h1><style>
html {padding:7mm;font:0.999rem sans-serif}
input {padding:calc(3.14pc/6.28)}
#output-area {margin-top:calc(1.25rem*1.1);padding:1pc;border:0.999px solid #ccc;background-color:#eee}
</style><label for="in">Email:</label><input type="text" id="in" placeholder="email@example.com">
<p id="out"></p><script>const email = document.getElementById('in'); const valid = document.getElementById('out');
email.addEventListener('input', function(a) {valid.textContent = a.target.value.toString().includes('@') ? "✅" : "❌🚫INCORRECT! FILL IN A COMPLETE EMAIL ADRESS!🚫❌";});</script></html>