From 9817331cfc0d02d5803f6b5c7aec01679610cdc1 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Mon, 4 Jan 2021 20:36:04 -0500 Subject: [PATCH] create --- app.js | 27 +++++++++++++++++++++++++++ index.html | 12 ++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 app.js create mode 100644 index.html diff --git a/app.js b/app.js new file mode 100644 index 0000000..040430c --- /dev/null +++ b/app.js @@ -0,0 +1,27 @@ +document.querySelector('button').addEventListener('click', () => { + const newRow = document.createElement('tr') + + const initiative = document.createElement('td'); + const initiativeInput = document.createElement('input'); + initiativeInput.setAttribute('type', 'number'); + initiativeInput.setAttribute('placeholder', 'initiative'); + initiative.appendChild(initiativeInput); + + const name = document.createElement('td'); + const nameInput = document.createElement('input'); + nameInput.setAttribute('type', 'text'); + nameInput.setAttribute('placeholder', 'name'); + name.appendChild(nameInput); + + const notes = document.createElement('td'); + const notesInput = document.createElement('textarea'); + notesInput.setAttribute('placeholder', 'notes'); + notes.appendChild(notesInput); + + newRow.appendChild(initiative); + newRow.appendChild(name); + newRow.appendChild(notes); + + document.querySelector('table').appendChild(newRow); + +}) diff --git a/index.html b/index.html new file mode 100644 index 0000000..cc78024 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + + +
+ + + +