I want to pass value of i as a parameter for autosuggest. My intention is to pass value of i starting from 1960 to till date.
<script>
var i=1960;
var currentTime = new Date();
var year = currentTime.getFullYear();
//document.write("The year is " + year);
while (i <= year)
{
//document.write("The year is " + i);
//document.write("<br />");
$("#txtYear").autocomplete([+i], {
width: 100,
//multiple: true,
mustMatch: true,
matchContains: true,
//formatItem: formatItem,
//formatResult: formatResult
});
i++;
}
});
</script>
Please help me out. Thank you so much in advance.