<script>
//1
var back;
back=prompt('请输入五个值','');
if(back){
alert('按照大小排序是:\n'+back.split(",").sort());
}
//2
var nTime;
nTime=new Date();
//alert(nTime.getHours());
nHour = nTime.getHours;
if(nHour>=0 && nHour<=12){
alert('上午好');
}
else if(nHour>12 && nHour<=18){
alert('中午好');
}
else{
alert('晚上好');
}
</script>