Created
March 21, 2017 04:55
-
-
Save ayoayco/e75a2fcb119f17037717ffda9aba2f1a to your computer and use it in GitHub Desktop.
html dropdown templates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="dropdown"> | |
<p>Month</p> | |
<select name="month" id="month"> | |
<option value=''>--Select Month--</option> | |
<option selected value='1'>Janaury</option> | |
<option value='2'>February</option> | |
<option value='3'>March</option> | |
<option value='4'>April</option> | |
<option value='5'>May</option> | |
<option value='6'>June</option> | |
<option value='7'>July</option> | |
<option value='8'>August</option> | |
<option value='9'>September</option> | |
<option value='10'>October</option> | |
<option value='11'>November</option> | |
<option value='12'>December</option> | |
</select> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="dropdown"> | |
<p>Year</p> | |
<!-- 'A-','A+','AB-','AB+','B-','B+','O-','O+','U' --> | |
<select name="year" id="year"> | |
</select> | |
<script> | |
var start = 1900; | |
var end = new Date().getFullYear(); | |
var options = ""; | |
for (var year = start; year <= end; year++) { | |
options += "<option>" + year + "</option>"; | |
} | |
document.getElementById("year").innerHTML = options; | |
</script> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment