O'Reilly logo

Practical Web Technologies by V. Lau, P. K. Yuen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required