1 <!DOCTYPE html>
2 <html>
3 <head lang="en">
4 <meta charset="UTF-8">
5 <title></title>
6 </head>
7 <body>
8 <script>
9 var tel=parseInt(prompt("====欢迎使用电话银行====\n"+"查询请按1\n"+"取款请按2\n"+"转账请按3\n"+"退出请按0\n"));
10 switch(tel){
11 case 0:
12 console.log("退出..........");
13 break;
14 case 1:
15 console.log("余额查询中....");
16 break;
17 case 2:
18 console.log("取款进行中....");
19 break;
20 case 3:
21 console.log("转账进行中....");
22 break;
23 default :
24 cosole.log("你的输入有误...");
25 break;
26 }
27 </script>
28 </body>
29 </html>