Get value of items from list using javascript
<p>I have this code :</p>

<pre><code>&lt;script&gt;
  function getgroup(){

        var i=0;
        var total=document.getElementById("selectedOptions").length;

    while (i&lt;total)
  {
    var group=document.getElementById("selectedOptions").value;
    var group2=group.substring(2);

    alert(group2);
     i++;
}
}
&lt;/Script&gt;
</code></pre>

<p>I want to loop inside the list and get the value of each item in the list.
By using this code I am getting only the value of the first item only.</p>

<p>Any help please?</p>
