Changes

An Overview of HTML Forms

10 bytes added, 18:29, 5 June 2007
JavaScript Check Boxes
In this case we have configured the button to call a JavaScript function when it is pressed. This function could, for example, pop up a window containing a description or product code list. To learn about JavaScript we recommend [[JavaScript_Essentials]].
== JavaScript HTML Check Boxes ==
The Check Box object creates a small square that which changes between a checked and uncheked unchecked state when clicked. Check Boxes are ideal for porviding providing the user with a "Yes" or "No" choice.
The Check Box object uses the ''<input>'' tag as follows:
The ''checked'' attribute states whether the box should be checked by default when it is first created.
The current setting of a CheckBox can be obtained in JavaScript by accessing the ''checked'' property of the object. For example:
<pre>
</pre>
the JavaScript The Check Box object has one javaScript event, ''onClick'', which is triggered when the user clicks on the box, and one method, ''click()'', which simulates a user click when called.
== JavaScript Radio Buttons ==