js vue 浏览器全屏

helei 2021-3-8 996 3/8
if(this.$data.isfullscreen){
                    this.$data.isfullscreen = false
                    document.exitFullscreen()
                    return
                }
                this.$data.isfullscreen = true
                var box=document.documentElement
                         if(box.requestFullscreen){
                             box.requestFullscreen()
                         }else if(box.webkitRequestFullscreen){
                             //谷歌浏览器
                             box.webkitRequestFullscreen()
                         }else if(box.mozRequestFullScreen){
                             //火狐浏览器
                             box.mozRequestFullScreen()
                         }else if(box.msRequestFullscreen){
                              //IE浏览器
                             box.msRequestFullscreen()
                         }else{
                             alert('你的浏览器版本太低!')
                         }

- THE END -

helei

3月08日09:19

最后修改:2021年3月8日
0

非特殊说明,本博所有文章均为博主原创。