Still waiting for the New York Times to send me a bogus takedown notice
Diffstat (limited to 'script.js')
-rw-r--r--script.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..5f3ad23
--- /dev/null
+++ b/script.js
@@ -0,0 +1,14 @@
+let answer = "hello";
+let form = document.querySelector('form');
+
+let input = document.querySelector('input');
+
+function hello(event) {
+ event.preventDefault();
+ let name = document.querySelector('#result');
+ if (input.value.length == 5) {
+ name.innerHTML = `${input.value}`;
+ } else {
+ name.innerHTML = "";
+ }
+}