给大家上一段直观明的代码
<div>日期控件:<input type="text" class="easyui-datebox" id="tsrq88_da"></div>
设置默认值
$(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);
});
代码如上,希望对小伙伴们有所帮助