gs****@mageos.com (GiSmo) writes:
hello I'm french so I hope I hunderstand your answers ! I'm begginer
in javascript and I would like to do this :
select all elements of one selection list (html) with a javascript
fonction
It requres the select element to accept multiple selected options
(e.g., the tag contains the "multiple" attribute).
Assume "selectRef" refers to the select element:
for (var i=0;i<selectRef.options.length;i++) {
selectRef.options[i].selected = true;
}
That is, set the "selected" field of each option to "true".
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'