Setting Radio Buttons Image

There are various ways you can get various form elements to change their values when you click on images. Here is a simple example that gets an element by its ID and changes its "checked" property to TRUE. 

HTML Example:

What is your favorite search engine?

Result:

What is your favorite search engine?


The example should work with other FORM elements as well. As a homework, assume your visitor may have more than one favorite search engine and change the radio buttons into checkboxes. Alternatively, design a drop-down list and allow the users to select values by clicking on images.

Share

Learn how to design amazing websites