js 年份选择
<select class="drop-down">
</select>
<script type="text/javascript">
var dropDown = document.getElementsByClassName('drop-down')[0];
for(var i = 1970;i<2019;i++){
var textnode = document.createTextNode(i+"年");
var options = document.createElement('option');
options.appendChild(textnode);
dropDown.appendChild(options);
}
</script>
无才难做千里马,有志可吞九霄云!