From fda6bdf1ebf59f1f86f122186ba726c1e83881f7 Mon Sep 17 00:00:00 2001 From: Saksham Mittal Date: Sat, 2 Apr 2022 18:58:42 +0530 Subject: Initial commit Basic webpage is setup with the ability to print the 5 letter word that a user types into the text box --- index.html | 16 ++++++++++++++++ script.js | 14 ++++++++++++++ style.css | 11 +++++++++++ 3 files changed, 41 insertions(+) create mode 100644 index.html create mode 100644 script.js create mode 100644 style.css diff --git a/index.html b/index.html new file mode 100644 index 0000000..5438389 --- /dev/null +++ b/index.html @@ -0,0 +1,16 @@ + + + + + Guessing Game + + + + +

Guessing Game

+
+ +
+

+ + 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 = ""; + } +} diff --git a/style.css b/style.css new file mode 100644 index 0000000..70d56db --- /dev/null +++ b/style.css @@ -0,0 +1,11 @@ +body { + background-color: #000000; + color: #ffffff; + font-family: sans-serif; + text-align: center; +} + +input { + background: #000000; + color: #ffffff; +} -- cgit 1.4.1