![]() |
Multiple-Selection List |
<script> <!-- function f() { var cities = ""; for(i=0; i<document.form.sel.length; i++) { if(document.form.sel.options[i].selected) { cities += document.form.sel.options[i].text + "\n" ; } } alert( "You selected the following cities :" + "\n" + cities); } // --> </script> <form name="form"> Please indicate which cities you would like to visit: <br> <select name="sel" multiple size="5"> <option> New York <option> Berlin <option> Rome <option> Sydney <option> Paris </select> <br> <input type="button" value="See Choice" onClick="f()"> </form> |
|