Cycling through a Multiple-Selection List
<html> <head> <title>Accessories List</title> <script type="text/javascript"> function seeList(form) { var result = ""; for (var i = 0; i < form.accList.length; i++) { if (form.accList.options[i].selected) { result += "\n " + form.accList.options[i].text; } } alert("You have selected:" + result); } </script> </head> <body> <form> <select name="accList" size="9" multiple="multiple"> <option selected="selected">A</option> <option>B</option> <option>C</option> <option>D</option> <option>E</option> </select></p> <p> <input type="button" value="View" onclick="seeList(this.form)" /> </p> </form> </body> </html>