15_常见问题.html 485 B

12345678910111213141516171819
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. // 常见问题
  11. var a = 3;
  12. // 条件判断 判断的是最终的结果
  13. // 在条件判断中 0为假 其他数组为真 空字符串为假 其他字符串为真
  14. if(a=""){
  15. console.log("a等于5");
  16. }
  17. </script>
  18. </body>
  19. </html>