1. 程式人生 > >7.21練習4

7.21練習4

set pro prompt htm tle ctype body b- charset

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
</body>
</html>
<script>
a=prompt("請輸入性別“,”")
b=prompt("請輸入身高“,”")
c=prompt("請輸入體重”,“")
x="女"
y="男"
d=b-113
e=b-107
f=b-103
g=b-97
if(a==x){
if(c>=d&&c<=e){
alert("標準")
}
else{
alert("不標準")
}
}
else if(a==y){
if(c>=f&&c<=g){
alert("標準")
}
else{
alert("不標準")
}
}
</script>

7.21練習4