限制订餐时间
Firebug Aborted异常
原timeout为1000即1秒,程序后台功能已经执行完毕,前台firebug控制却老显示Aborted,后来检查为超时造成。改为3秒即可。
// 午餐9:00-10:30 晚餐14:30-16:00
function checkMealTime(){
var tmp=new Date().toLocaleTimeString().split(":");
if(tmp[0]>=9&&tmp[0]<=10){
if(tmp[0]==10&&tmp[1]>30){
return false;
}
return true;
}
if(tmp[0]>=14&&tmp[0]<=16){
if(tmp[0]==14&&tmp[1]<30){
return false;
}
if(tmp[0]==16&&tmp[1]>0){
return false;
}
return true;
}
return false;
}
alert(checkMealTime());
Firebug Aborted异常
$.ajax({// 保存签收组人员
async : true,// required
type : 'post',
dataType : 'json',
timeout : 3000,
url : ContextPath + SaveQszryUrl,
data : {
'qszId' : '',
'ryIds' : tmp.join(',')
},
success : function(data) {
alert(data);
}
});
原timeout为1000即1秒,程序后台功能已经执行完毕,前台firebug控制却老显示Aborted,后来检查为超时造成。改为3秒即可。