JavaScript

Events' Elements

There are some elements that are commonly paired up with event handlers in use. They will be featured in this page as we go.


Input element

<input type="the-type" value="the-label" onevent="the-action">

Attributes:

HTML attributes are not case-sensitive, but usually lowercases are used. DOM Property is case-sensitive.


Select Element

<select id="idName">
<option value="1">option1</option>
<option value="2">option2</option>
<option value="3">option3</option>
</select>

<select> elements allow to select 1 option at a time.

Multiple attribute

<select id="idName" multiple>
<option value="1">option1</option>
<option value="2">option2</option>
<option value="3">option3</option>
</select>

Attribute multiple allows multiple selection.


Sandbox

//code

References: