HTMLFormElement
or SubmitEvent
to get the values from
a mapping between the input's name and their values. The type of value is determined as so:
<input type="checkbox">
: boolean
or null
if indeterminate<input type="datetime-local">
: Date
or null
if none is entered<input type="file">
: FileList
<input type="number">
: number
<input type="range">
: number
<input type="radio">
: string
- The value of the selected radio button. If none are selected, this will be an
empty string. This reflects the behaviour of RadioNodeList
.string
Takes in a form element or submit event and returns a mapping between the input's name and their values
If using a
SubmitEvent
, thename
andvalue
of theHTMLButtonElement
used to submit the form will be included.