Click the button to display an alert box.

<button onclick="myFunction()">Try it</button>

<script><br />
function myFunction() {<br />
    document.body.requestFullscreen();<br />
    alert("Hello! I am an alert box!");<br />
}<br />
</script>