var result_time = 45852221;
var simple_text;
switch (result_time) {
case result_time < 60:
simple_text = "";
break;
case result_time > 60 && result_time < 3600 : //
simple_text = Math.round(result_time/60)+"";
break;
case result_time > 3600 && result_time < 86400 : //
simple_text = Math.round(result_time/60/24)+"";
break;
case result_time > 86400 && result_time < 2592000 : //
simple_text = Math.round(result_time/60/60/24)+"";
break;
case result_time > 2592000 && result_time < 31104000 : //
simple_text = Math.round(result_time/60/60/24/30)+"";
break;
case result_time > 31104000: //
simple_text = Math.round(result_time/60/60/24/30/12)+"";
break;
}
document.write(simple_text)
as shown in the figure above, this is a judgment statement that simplifies time. Why can"t it judge any case??