spring使用jquery的datebox

每次很懼怕使用jquery的datebox,由於datebox有個默認值爲null,因此使用required屬性對datebox沒用,所以,每次遇到datebox時我都會從後臺傳date值給它,就能夠判斷是否爲空了,例如 jquery

<input class="easyui-datebox" id="activity_activityTime" name="activityTime" value=「${date}」 style="width:300px;" required="required"/>. app

2.在js裏面獲取datebox的input框的值時,不能使用$("#activity_activityTime").val(),而是使用$("#activity_activityTime").datebox('getValue')。 函數

3.在js裏面須要點擊datebox填完時間在改變其餘輸入框的數據時,不能使用$("#activity_activityTime").blur()、$("#activity_activityTime").change()、$("#activity_activityTime").onfocus()等和其餘input框使用的函數,而是 post

$("#appointment_date").datebox({
onSelect: function(date){
var appDate=$("#appointment_date").datebox('getValue');
$("input[type='checkbox']").remove();
$.post('findCourseAppointmentByDate',{date:appDate,idKey:sss},function(data){
 var dataRows=data.rows;
 if(dataRows.length>0){
 $.each(data.rows, function(index,item){
var id=item.id;
        $("#classId").append("<input type='checkbox' name='memo' value='"+item.id+"'/>"+item.className);
         });  
 }else{
 $("#classId").append("<input type='checkbox' name='memo' value='0' checked='checked'/>"+"無節次");
 }
});
}
});

ui

相關文章
相關標籤/搜索