zoukankan      html  css  js  c++  java
  • 使用JAVASCRIPT进行全屏显示页面,就像触摸屏显示效果

    <script type="text/javascript">
            window.onload = function() {
                if (window.name !== 'fullWindow') {
                    var win = window.open(location.href, 'fullWindow', 'fullscreen=1,scrollbars=0');
                    window.open('', '_self');
                    window.top.opener = null;
                    window.top.close();
                    if (typeof win != 'undefined') win.focus();

    //                var win = openFullWindow(window.location.href, 'fullWindow');
    //                window.opener = null;
    //                window.close();
    //                win.focus();
                }
            }

            function openFullWindow(url, name)
            {
                if (url == "")
                    return;
                var url; //转向网页的地址;
                var name; //网页名称,可为空;
                var iWidth = window.screen.availWidth; //弹出窗口的宽度;
                var iHeight = window.screen.availHeight; //弹出窗口的高度;
                var iTop = 0; //获得窗口的垂直位置;
                var iLeft = 0; //获得窗口的水平位置;
                //window.open(url, name, 'height=' + iHeight + ',,innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',fullscreen =0,toolbar=0,menubar=0,resizable=0,scrollbars=0,location=no,status=no');
                window.open(url, name, 'fullscreen=1,scrollbars=0');
            }
        </script>

    调用JS 进行弹出显示窗口

    <a onclick="javascript:openFullWindow('about.html','about');" style=" cursor:pointer;">
                        <img src="resource/images/index_03.gif" width="179" height="168" border="0" alt="" /></a>

  • 相关阅读:
    AOJ 718.计算GPA
    AOJ 11.Rails
    AOJ 592.神奇的叶子
    AOJ 10.目标柏林
    洛谷P1030求先序排列
    vijos1514天才的记忆
    洛谷2016战略游戏
    LOJ10155数字转换
    洛谷2014选课
    洛谷2015二叉苹果树
  • 原文地址:https://www.cnblogs.com/huanghai223/p/1855443.html
Copyright © 2011-2022 走看看