10.2. Controlling input elements with DOM interfaces

10.2.1. Generating text field, button, radio, and checkbox

Some of the most popular interface elements on the Web are “Text Box,” “Button,” “Radio Box,” and “Check Box.” In order to get user input and to interact with the user, these boxes are important and usually implemented by using the HTML/XHTML <input> element. For example, the statement

   <input type="text" class="styleSt" value="My Text Box" />

is often used to generate a text field (or text box) to get text input. This text field contains some CSS properties and has an initial value as “My Text Box.” You can, of course, change the value by typing something else on the page. Different type attributes would generate different input ...

Get Practical Web Technologies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.