JavaScript 数字正无穷


JavaScript 数字正无穷

<html>
   <head>

      <script type = "text/javascript">
         <!--
            function showValue() {
               var bigNumber = Number.MAX_VALUE * 2

               if (bigNumber == Number.POSITIVE_INFINITY) {
                  alert("Value of bigNumber : " + bigNumber );
               }
            }
         //-->
      </script>

   </head>

   <body>
      <p>Click the following to see the result:</p>

      <form>
         <input type = "button" value = "Click Me" onclick = "showValue();" />
      </form>

   </body>
</html>