write a selection in js


function writeOptions(startYear, endYear)
{

var optionCounter;
for (optionCounter = startYear; optionCounter <= endYear; optionCounter++)
{

document.write(‘<1OPTION value=’ + optionCounter + ‘>’ + optionCounter+’‘);
}
}

example:
<1select name=”emonth” style=”width:60px”>
<1option value=”0″>–mm–
<1script type=”text/javascript”>
writeOptions(01,12);
<1/script>
<1/select>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s