标签:
http://blog.csdn.net/wangjingjing1014/article/details/16885341
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<select class="easyui-combobox" id="cbYearContrast" name="select" panelHeight="auto" style=" width:80px; padding-top:5px; margin-top:10px;">
</select>
</body>
<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>
</html>
获取下拉菜单选中的值:var year = $(‘#cbYearContrast‘).combobox(‘getValue‘);
jQuery EasyUI 下拉菜单获取日期,最高年份为当前年份,最低年份为当前年份向前推10年
标签:
原文地址:http://www.cnblogs.com/zkwarrior/p/4847477.html