简体   繁体   中英

Why is the Fullscreen API w3schools example not working in Firefox

Does anyone know why the fullscreen api does not work on Firefox? The w3schools example does not work either. I don't get any response from the button clicks. https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_fullscreen2

I am trying to do a fullscreen div via a button click. It works in Chrome but not Firefox

Open the developer tools. Look at the console. Firefox will tell you why.

Request for fullscreen was denied because at least one of the document's containing elements is not an iframe or does not have an "allowfullscreen" attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM