div
, h1
, p
, etc.)#theID
, div#theID
, etc.).theClass
, p.theClass
, etc.)document.querySelector
/document.querySelectorAll
.innerText
/.innerHTML
onsubmit
.preventDefault
Presentations have been converted from their original format to play in web browsers.
Grab values from form fields and add them to a list.
You’ll need to employ these concepts that we used in class:
* Target elements with document.querySelector
* Handle events
* Prevent default event behavior from executing
* Alter an element’s contents via innerHTML
<dl>
).Output something like this:
<dl>
<li>
<dt>First Name</dt>
<dd>Davey</dd>
</li>
<li>
<dt>Hair color</dt>
<dd>#000000</dd>
</li>
<!-- etc. -->
</dl>
Display the color value in the specified color.
Update: Solution: FirstJS (Basic Form)