Skip to content

Instantly share code, notes, and snippets.

@gunaevart
Created December 6, 2016 12:59
Show Gist options
  • Save gunaevart/51d944e5d5e3f0a4bce445e38cf6d6a5 to your computer and use it in GitHub Desktop.
Save gunaevart/51d944e5d5e3f0a4bce445e38cf6d6a5 to your computer and use it in GitHub Desktop.
// 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