<script> var date = window.prompt("请输入你要比较转换的值:"); switch(date) { case "Monday" : document.write("It is Monday."); break; case "Tuesday" : document.write("It is Tuesday."); break; case "Wednesday" : document.write("It is Wednesday."); break; case "Thursday" : document.write("It is Thursday."); break; case "Friday" : document.write("It is Friday."); break; case "Saturday" : document.write("It is Saturday."); break; case "Sunday" : document.write("It is Sunday."); break; } </script>