From b9735711b32a4a6474af5ecbc1b24f2f10508dfc Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Wed, 21 Feb 2018 10:48:10 -0700 Subject: [PATCH] Add a clear button to pad --- index.html | 12 +++++++++++- index.js | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 3d8f1ef..e7ee6d8 100644 --- a/index.html +++ b/index.html @@ -52,10 +52,20 @@ +
+ + + Clear Pad + + + + + +
-
+
diff --git a/index.js b/index.js index 3efefac..d016ded 100644 --- a/index.js +++ b/index.js @@ -81,4 +81,9 @@ window.onload = () => { const output = generatePad(length); document.getElementById('inputPad').value = output.join(''); } + + document.getElementById('clearPad').onclick = () => { + document.getElementById('padLength').value = ''; + document.getElementById('inputPad').value = ''; + } }