//Traverse the time period and append it to the drop-down list
var str;
for (var i = 1; i <=24; i++) {
for (var j = 0; j < 60; ) {
if(j==0 || i==24){
str=i+":"+j+"0";
}else{
str=i+":"+j;
}
$("#startTime" ).append("");
$("#endTime").append("");
if(j<60) j+=10;
if(i==24) break;
// if(j>=50){
// j+=9;
// }else{
// j+=10;
// }
}
}
//Compare the size of two characters
function addTime(){
var hour_select_begin=$ ('#startTime option:selected').text();
var hour_select_end=$('#endTime option:selected').text();
// alert(hour_select_begin+":"+hour_select_end+"_"+eval( "hour_select_begin"));
if(eval("hour_select_begin")>=eval("hour_select_end")){
alert("The end time cannot be less than or equal to the start time");
return false;
}
}