Return to Snippet

Revision: 56188
at March 15, 2012 03:22 by JonnyCraze


Initial Code
var i = $('#age').size();
        var age = 18;

        for (i = 0; i < 82; i++) {
            $('#age').append('<option>' + age + '</option>');
            age++
        }

Initial URL

                                

Initial Description
I hate manually entering in tons of numbers and tags for numbers, so I made a loop for it.

Initial Title
Javascript Select Box - Age Loop

Initial Tags
dropdown

Initial Language
JavaScript