javascript, selection option using for loop that return the selected value
<p>I'm pretty new to javascript so please bear with me. I'm trying to create a drop down list of age choice from 1-100, with option 20 show as default. I also need to get the return value of the choice user selected so i can use to calculate the years. Here is the code i'm playing around with so far. 
    </p>

<pre><code>    function createAgeList()
    {
        var myAgeOptions;

        for (cntr=1; cntr&lt;100; cntr++)
        {
           myAgeOptions = myAgeOptions + "&lt;option value=" + cntr + "&gt;" + cntr + "&lt;/option&gt;";
        }

        var myAgeSelect = document.getElementById('agelist');
        myAgeSelect.innerHTML = myAgeOptions;
    }
</code></pre>

<p></p>

<pre><code>HTML code:
&lt;form name="yearsleptform" id="yearsleptform" method="post"&gt;
  &lt;select size="1" id="agelist" name="agelist"&gt;
  &lt;/select&gt;
&lt;/form&gt;
</code></pre>
