O'Reilly logo

HTML5 Data and Services Cookbook by Mite Mitreski, Gorgi Kosev

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

Using multiple-choice select lists

Select lists can be made to allow users to select multiple elements.

Multiple-choice select lists have a special serialization model. In this recipe we're going to look at how that model works and how to use it.

We're going to create a page with a form containing a multiple-choice select list. This form will send a GET request to another page where we're going to extract the selected items via JavaScript.

Using multiple-choice select lists

How to do it...

Follow these steps:

  1. Create a basic page with a form that has a multiple select list as shown in the following code snippet:
    <!DOCTYPE HTML> <html> <head> <title>Dropdown</title> </head> <body> <form ...

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