I want to create a button to cancel a fullscreen function / event without toogle function just click the button and close the full screen mode.
Can anyone help me?
I want to create a button to cancel a fullscreen function / event without toogle function just click the button and close the full screen mode.
Can anyone help me?
I was able to resolve my issue with JavaScript
Solution:
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script><script>functionexitFullscreen(){if(document.exitFullscreen){document.exitFullscreen();}elseif(document.mozCancelFullScreen){document.mozCancelFullScreen();}elseif(document.webkitExitFullscreen){document.webkitExitFullscreen();}}</script>html:<buttonclass="fechar" onclick="exitFullscreen();"> X </button>