Jump to content
Sign in to follow this  
Html

Drop down menu

Recommended Posts

Hi,

I want to create a drop down menu, like used for entering a date of birth. I looked on the Learn html section, and I also tried searching, I couldn't find what I need specifically to do.

 

Thank you.

Share this post


Link to post
Share on other sites

The <select> element creates a dropdown. If you're looking for something more complicated, then describe it in more detail.

Share this post


Link to post
Share on other sites

Hi,

I have posted this example, so I want day, then month and year of birth. I've made a start there, so where do I go from here?

 

  <select>
    <option value="">1</option>
    <option value="">2</option>
    <option value="">3</option>
    <option value="">4</option>
    <option value="">5</option>
  </select>

 

Edited by Html

Share this post


Link to post
Share on other sites

You need three dropdowns

<select name="day">
  <option value="1">1</option>
  <option value="2">2</option>
  <option value="3">3</option>
  <option value="4">4</option>
  ...
  <option value="31">31</option>
</select>

<select name="month">
  <option value="1">January</option>
  <option value="2">February</option>
  <option value="3">March</option>
  ...
  <option value="12">December</option>
</select>

<select name="year">
  <option value="1900">1900</option>
  <option value="1900">1901</option>
  <option value="1900">1901</option>
  ...
  <option value="2018">2018</option>
</select>

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×