HTML looping option values in drop down list
I have been trying to do a form where a question about one's current age is included, and I have decided the easiest way to answer this question is by filling in a drop down list. So my first value in the drop down list shall be 1900 and then it shall increment by one till it reaches 2014. How do I do that? I wouldn't set a fixed final year, why recode again next year? Note that it is more effecient to update the DOM once than updaing the DOM for each year added to the list. HTML <select id="year"></select> Script var start = 1900; var end = new Date().getFullYear(); var options = ""; for(var