ID
<input type="..." name="..." id="..." />
As with other HTML elements, assign a unique id so languages like JavaScript can refer to the element.
The id
attribute allows JavaScript to access data from the element. (The id
attribute is also used when applying styles to elements. We will discuss this later in the course.)
- Previous
- Next