January 2018
Intermediate to advanced
678 pages
20h 16m
English
There are different types of buttons, each with its own syntax. To keep things simple, we’ll start with just one type of button, and here’s its syntax:
<input type="button" value="button-label" onclick="click-event-handler">
Note that the code is a void element that uses the input tag. As its name suggests, the input tag implements elements that handle user input. You might not think of a button as user input, but it is—the user chooses to do something by clicking a button. Later, we’ll introduce other user input elements (e.g., text controls and checkboxes) that also use the input tag.
As we’ve done throughout the book when introducing new constructs, the prior code fragment shows only the most important syntax details, so you ...
Read now
Unlock full access