欢迎来到GANDAN主页

24js Number(数字)对象

<!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>
    <!-- Number对象 -->
  </head>
  <body>
    <script>
      var a = new Number("123");
      var b = Number("456");
      var c = 789;
      var d = new Number("abc");
      document.write(typeof a + "</br>");
      document.write(typeof b + "</br>");
      document.write(typeof c + "</br>");
      document.write(d + "</br>");
    </script>
  </body>
</html>
posted @ 2021-12-23 22:01  博客新手人  阅读(25)  评论(0编辑  收藏  举报