x
1
<html>
2
<head>
3
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
4
<script>var clicky_site_ids = clicky_site_ids || []; clicky_site_ids.push(101319977);</script><script async src="//static.getclicky.com/js"></script></head>
5
<h2>
6
JavaScript POSITIVE_INFINITY Example
7
</h2>
8
<body>
9
<p>Click the button to see the result:</p>
10
<form>
11
<input type="button" value="Click" onclick="showValue();"/>
12
</form>
13
<script type="text/javascript">
14
function showValue()
15
{
16
var myNumber = Number.MAX_VALUE * 2
17
if (myNumber == Number.POSITIVE_INFINITY) {
18
alert("The Value is : " + myNumber );
19
}
20
}
21
</script>
22
<p>
23
Any positive value, including POSITIVE_INFINITY, multiplied by POSITIVE_INFINITY is POSITIVE_INFINITY.
24
</p>
25
</body>
26
</html>
27