Created
December 6, 2016 12:59
-
-
Save gunaevart/51d944e5d5e3f0a4bce445e38cf6d6a5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// JavaScript | |
function month(){ | |
document.write('<option value="0">месяц</option>'); | |
var month_name = ['', 'январь', 'февраль', 'март', 'апрель', 'май', 'июнь', 'июль', 'август', 'сентябрь', 'октябрь', 'ноябрь', 'декабрь']; | |
var g = 1; | |
while(g <= month_name.length){ | |
var g1 = g++; | |
document.write('<option value="' + g1 + '">' + month_name[g1] + '</option>'); | |
} | |
} | |
//HTML | |
<select id="month"> | |
<script type="text/javascript">month(); </script> | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment