显示 Boolean(10 > 9) 的值
- <!DOCTYPE html>
- <html>
- <body>
- <p>显示 Boolean(10 > 9) 的值:</p>
- <button onclick="myFunction()">试一试</button>
- <p id="demo"></p>
- <script>
- function myFunction() {
- document.getElementById("demo").innerHTML = Boolean(10 > 9);
- }
- </script>
- </body>
- </html>