Select All/None Select List

[Total: 0    Average: 0/5]

This example shows how to select all or none of the items in a select list.

Body Code:

<form action="" name="exf1">
<select name="s1" size="4" multiple>
    <option value="one">One
    <option value="two">Two
    <option value="three">Three
    <option value="four">Four
<input type="button" value="select all" onclick="selAll(true)">
<input type="button" value="select none" onclick="selAll(false)">
function selAll(_v) {
for(var i=0;i<document.exf1.s1.length;i++)

Times Viewed: 12

Leave a Reply

Your email address will not be published. Required fields are marked *