2017/09/19
<script>
var a = prompt("請輸入第一個數字");
var b = prompt("請輸入第二個數字");
var ys = prompt("請輸入運算符");
a = parseInt(a)
b = parseInt(b)
switch(ys)
{case "+":
alert(a+b);
break;
case "-":
alert(a-b);
break;
case "*":
alert(a*b);
break;
case "/":
alert(a/b);
break;}
</script>
<script>
var a = prompt("姓名")
var b = prompt("成績")
if(b==100){alert("恭喜你"+a+"滿分通過")}
else
if(b<100,b>80){alert(a+",你們優秀繼續保持")}
else
if(b<80,b>60){aler(a+"成績良好")}
else
if(b<60,b>50){alert(a+"就差一點點,下次一定至少要及格")}
else
if(b<50){alert(a+"你是笨蛋忙")}
</script>
<script>
var x = prompt("x");
var y = prompt("y");
var z = prompt("z");
if (x<y&&x<z&&y<z)
{alert(x+y+z);}
if (x<z&&x<y&&z<y)
{alert(x+z+y);}
if (y<x&&y<z&&x<z)
{alert(y+x+z);}
if (y<z&&y<x&&z<x)
{alert(y+z+x);}
if (z<x&&z<y&&x<y)
{alert(z+x+y);}
if (z<y&&z<x&&y<x)
{alert(z+y+x);}
</script>
2017/09/19