Recently, the project requires full-screen effect of the browser. I have checked a lot of information and finally found a piece of code, saying it is compatible.Google Chrome 15+, safri5.1+, firfox10+, IE11 support, I only tried Firefox, 360, and IE8, but it was not successful. I will send you the code and copy it to the HTML page to achieve it!
<input type="button" value="start full screen" οnclick="kaishi()" />
<input type="button" value="Close full screen" οnclick="guanbi()" />
<script>
function kaishi()
{
var docElm = ;
//W3C
if () {
();
}
//FireFox
else if () {
();
}
//Chrome etc.
else if () {
();
}
//IE11
else if () {
();
}
}
function guanbi() {
if () {
();
}
else if () {
();
}
else if () {
();
}
else if () {
();
}
}
("fullscreenchange", function () {
= () ? "" : "not ";
}, false);
("mozfullscreenchange", function () {
= () ? "" : "not ";
}, false);
("webkitfullscreenchange", function () {
= () ? "" : "not ";
}, false);
("msfullscreenchange", function () {
= () ? "" : "not ";
}, false);
</script>
Source:/javascript/
I've been very busy with projects recently..................
——————————————————————————————————————————————————————————————