1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <script type="text/javascript" src="/lib/jquery-3.4.1.js"></script>
- <script type="text/javascript" src="/lib/jquery-3.4.1.min.js"></script>
- <script src="/lib/jquery.min.js"></script>
- <script>
- function quan() {
- /*全屏iframe兼容*/
- var docElm = document.documentElement;
- if (docElm.requestFullscreen) {
- docElm.requestFullscreen();
- } else if (docElm.mozRequestFullScreen) {
- docElm.mozRequestFullScreen();
- } else if (docElm.msRequestFullscreen) {
- docElm.msRequestFullscreen();
- } else if (docElm.oRequestFullscreen) {
- docElm.oRequestFullscreen();
- } else if (docElm.webkitRequestFullScreen) {
- docElm.webkitRequestFullScreen();
- }
- $(".grid_12").css("display", "none");
- $("#site_info").css("display", "none");
- $("#full-screen-btn").css("display", "none");
- $("iframe").css("height", "100%");
- $("iframe").css("width", "100%");
- $("iframe").css("position", 'fixed');
- $("iframe").css("left", "0px");
- $("iframe").css("top", "0px");
- }
- function exitQ() {
- var mainheight = $('.sidemenu').height();
- $(".grid_12").css("display", "");
- $("#site_info").css("display", "");
- $("#full-screen-btn").css("display", "");
- /*退屏iframe兼容*/
- if (document.exitFullscreen) {
- document.exitFullscreen();
- } else if (document.msExitFullscreen) {
- document.msExitFullscreen();
- } else if (document.mozCancelFullScreen) {
- document.mozCancelFullScreen();
- } else if (document.oRequestFullscreen) {
- document.oCancelFullScreen();
- } else if (document.webkitCancelFullScreen) {
- document.webkitCancelFullScreen();
- }
- $("iframe").css("height",mainheight + 'px');
- $("iframe").css("width", "");
- $("iframe").css("position", "");
- $("iframe").css("left", "");
- $("iframe").css("top", "");
- }
- $("#full-screen-btn").click(function () {
- if ($("#full-screen-btn").text() == "全屏显示") {
- parent.quan();
- $("#full-screen-btn").text("退出全屏");
- } else {
- parent.exitQ();
- $("#full-screen-btn").text("全屏显示");
- }
- });
- </script>
- <style>
- body, html {
- height: 100%;
- margin: 0;
- }
- .fullScreen {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- }
- </style>
- </head>
- <body>
- <iframe id="iframe_view" class="embed-responsive-item container well well-small span6" style="height: 720px; width: 1280px; background-color: #2e2e2e;" src="https://www.baidu.com/" frameborder="0" scrolling="no" allowfullscreen>
- </iframe>
- </body>
- </html>
|