JavaScript 数字最大值


JavaScript 数字最大值

<html>
   <head>
      <script>
         function showMinValue() {
            var val = Number.MIN_VALUE;
            alert("Value of Number.MIN_VALUE : " + val );
         }
         function showMaxValue() {
            var val = Number.MAX_VALUE;
            alert("Value of Number.MAX_VALUE : " + val );
         }
      </script>
   </head>

   <body>
      <p>Click the following to see the result:</p>
      <form>
         <input type="button" value="MIN" onclick="showMinValue();" />
         <input type="button" value="MAX" onclick="showMaxValue();" />
      </form>
   </body>
</html>