We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 278b2ef commit 720555fCopy full SHA for 720555f
2 files changed
index.html
@@ -10,7 +10,7 @@
10
11
12
<form>
13
- <textarea>
+ <textarea name="message">
14
What is populated with it
15
</textarea>
16
<input type="submit" />
src/main.ts
@@ -1,4 +1,12 @@
1
import './style.css'
2
3
+const form = document.querySelector('form')
4
+const posts = document.querySelector('ol')
5
6
+form?.addEventListener('submit', e => {
7
+ e.preventDefault()
8
9
+ const data = new FormData(e.target)
+ console.log("d", data.get('message'))
+
+})
0 commit comments