js代码,通过系统时间限制动态地添加select选项的实例代码。
虽然它是一个简单的效果,它需要积累和记录它。源代码如下所示:
—
2015级
2014级
2013级
2012级
—
2015级
2014级
2013级
2012级
时间=新日期();
VaR月= time.getmonth()+ 1;
VaR天= time.getday();
如果(月> 5day > 1){
无功objselect = document.getelementbyid(myselect2 );
ObjSelect.options.add(新的选项(2016级
(5)objselect.options.remove;
}
如果(月> 7day > 1){
无功objselect = document.getelementbyid(myselect1 );
ObjSelect.options.add(新的选项(2016级
(5)objselect.options.remove;
}