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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...