02_ if_else if 练习
-
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>小花的相亲</title> </head> <body> <script type="text/javascript"> var manHeight = +prompt("请输入男方身高(xxcm):"); var manMoney = +prompt("请输入男方财产(xx万):"); var manFace = +prompt("请输入男方颜值(0-1000):"); var girlWords; if (manHeight > 180 && manMoney > 1000 && manFace > 500 ) { girlWords = "我一定要嫁给他!"; } else if (manHeight > 180 || manMoney > 1000 || manFace > 500 ) { girlWords = "嫁吧,比上不足,比下有余。"; } else { girlWords = "不嫁!"; } alert(girlWords); document.write(girlWords); </script> </body> </html>
--------小尾巴
________一个人欣赏-最后一朵颜色的消逝-忠诚于我的是·一颗叫做野的心.决不受人奴役.怒火中生的那一刻·终将结束...