无标题文档
<script type="text/javascript">
var currentYear = new Date().getFullYear();
var select = document.getElementById("cbYearContrast");
for (var i = 0; i <= 10; i++) {
var theOption = document.createElement("option");
theOption.innerHTML = currentYear-i + "年";
theOption.value = currentYear-i;
select.appendChild(theOption);
}
《script》