1234567891011121314151617181920212223242526272829303132333435363738 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <script>
- /*
- 女方家长要嫁女儿,提出了一定的条件:
- 身高:180cm以上;财富:1000万以上;颜值:500以上;
- 如果这三个条件同时满足,则:‘我一定要嫁给他’
- 如果三个条件有为真的情况,则:‘嫁吧,比上不足,比下有余’
- 如果三个条件都不满足,则:‘不嫁’
- */
- var height = prompt("请输入你的身高(cm):");
- var money = prompt("请输入你的财富(万):");
- var face = prompt("请输入你的颜值(PX):");
- alert(height+"--"+money+"--"+face);
- //或者写成下面的格式
- // alert(height+","+money+","+face);
- if(height >180 && money >1000 && face >500){
- alert("我一定要嫁给他");
- }else if(height >180 || money >1000 || face >500){
- alert("嫁吧,比上不足,比下有余");
- }else{
- alert("不嫁");
- }
- </script>
- </head>
- <body>
-
- </body>
- </html>
|