JavaScript 数字负无穷


JavaScript 数字负无穷

<html>
   <head>

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

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

   </head>

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

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

   </body>
</html>