easyui datebox 初始化设置当前日期

给大家上一段直观明的代码


日期控件:

设置默认值

   $(function(){
	   var curr_time = new Date();
	   var str = curr_time.getFullYear()+"-";
	   str += curr_time.getMonth()+1+"-";
	   str += curr_time.getDate()+"-";
	   str += curr_time.getHours()+":";
	   str += curr_time.getMinutes()+":";
	   str += curr_time.getSeconds();
	   $('#tsrq88_da').datebox('setValue',str);
   });

代码如上,希望对小伙伴们有所帮助

你可能感兴趣的:(前端)