1
<p id="demo">单击按钮显示负无穷大</p>
2
<button onclick="myFunction()">点我</button>
3
<script>
4
function myFunction() {
5
var x = 100;
6
var demo = document.getElementById("demo");
7
demo.innerHTML = x.NEGATIVE_INFINITY;
8
}
9
</script>
<p id="demo">单击按钮显示负无穷大</p>
<button onclick="myFunction()">点我</button>
<script>
function myFunction() {
var x = 100;
var demo = document.getElementById("demo");
demo.innerHTML = x.NEGATIVE_INFINITY;
}
</script>