综合练习1选择判断部分.html 940 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. <div class="box"></div>
  10. <script>
  11. var str = "hello";
  12. var str1 = "<div class='box'></div>";
  13. var str2 = '<div class="box"></div>';
  14. var num;
  15. console.log(num);
  16. num2 = 10;
  17. console.log(num2);
  18. //1+2 = 3
  19. // 1+"hell"
  20. // var a = 1;
  21. // var b = 2;
  22. // var a = 1,b=2;
  23. // var a = true,b;
  24. // \反斜线开头的表示转义字符 \n 回车
  25. console.log("hello\nworld");
  26. console.log("he\"llo")
  27. console.log("hel\'lo");
  28. //NaN not a number
  29. // var str11 = "a";
  30. // var str12 = "b";
  31. var str11 = "11";
  32. var str12 = "2";
  33. console.log(str11<str12);
  34. </script>
  35. </body>
  36. </html>