放大:myVideo.webkitRequestFullScreen();
    缩小:document.webkitCancelFullScreen();
    这些方法是不全面的,仅限于谷歌浏览器

    1. //进入全屏
    2. function FullScreen() {
    3. var ele = document.documentElement;
    4. if (ele.requestFullscreen) {
    5. ele.requestFullscreen();
    6. } else if (ele.mozRequestFullScreen) {
    7. ele.mozRequestFullScreen();
    8. } else if (ele.webkitRequestFullScreen) {
    9. ele.webkitRequestFullScreen();
    10. }
    11. }
    12. //退出全屏
    13. function exitFullscreen() {
    14. var de = document;
    15. if (de.exitFullscreen) {
    16. de.exitFullscreen();
    17. } else if (de.mozCancelFullScreen) {
    18. de.mozCancelFullScreen();
    19. } else if (de.webkitCancelFullScreen) {
    20. de.webkitCancelFullScreen();
    21. }
    22. }