Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6191437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:45:49+00:00 2026-05-24T02:45:49+00:00

How do I use <select> <option>numbers1-100</option> </select> I have to use 1 to 100

  • 0

How do I use

          <select>
          <option>numbers1-100</option>
          </select>

I have to use 1 to 100 numbers in my option list.Typing all the options takes time and makes code bigger.I guess we have to use javascript to make it work using for loop and document write.But I dont know how to put the code in the right way.How do i list the options list using java script? I mean the java script should be beside my label;example

        number : 1-1oo \\ here the options list should be printed

and number can be anywhere but the script should print options list beside the number.How do i make it ? Unable to figure it out.Been trying from an hour or so.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T02:45:50+00:00Added an answer on May 24, 2026 at 2:45 am

    Place this function in your <script> tags or include it within a script. Than call the function, createSelectOption() whenever you need the select box to be created.

    Here is how you would have it loaded on page load with just javascript: `

    function createSelectOption() {    
        var select_option = '<select>';
        for(i = 1; i <= 100; i++) { 
           select_option += '<option value=' + i + '>' + i + '</option>';
        }
        select_option += '</select>';
        document.getElementById('div').innerHTML = select_option;
    }
    

    I have included a jsfiddle demo to show you that it should be working/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a easy select tag: <select> <option></option> <option></option> </select> Then I want use
I have a list of select boxes with incremental numbers to identify then e.g.
I use this code to fill select options based on the first select. That
I have a select option list and im using jQuery Mobile. My list is
So basically there is a option to select a css stylesheet, which to use
How to use conditional select query in SQL Server ? I have a column
i have the following script <select id=select1> <option value=1>1day</option> <option value=2>2day</option> <option value=3>3day</option> </select>
I've written an event handler that detects a change in a select option list
I have a problem making a select tag in php code dynamic. I'm creating
I have an html select: <select> <option>Choose one</option> </select> Using jQuery, is there an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.