var a=prompt("输入一个水果");
switch(a){
case "苹果":
document.write("1.1/斤");
break;
case "香蕉":
document.write("1.7/斤");
break;
case "榴莲":
document.write("1.6/斤");
break;
case "橙子":
document.write("1.5/斤");
break;
case "山竹":
document.write("1.4/斤");
break;
case "椰子":
document.write("1.3/斤");
break;
case "青梅":
document.write("1.2/斤");
break;
default:
![](https://img2023.cnblogs.com/b![](https://img2023.cnblogs.com/blog/3121444/202303/3121444-20230328174717149-818780836.png)
log/3121444/202303/3121444-20230328174650117-1865856732.png)
document.write("没有该水果价格");
}