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>

  • 相关阅读:
    Scrum框架及其背后的原则(上)——Scrum 框架的伪代码描述[转载自InfoQ]
    用程序给闺女出算数题——我的头脑体操
    敏捷实践调查结果[翻译转载]
    一.初识Selenium
    二.Selenium安装相关文件
    Review of American Beauty(unoriginal)
    三.Selenium IDE学习
    将Java Project转变为Dynamic Web Project
    功能自动化工具watiJ(转载)
    Selenium前奏
  • 原文地址:https://www.cnblogs.com/huanghai223/p/1855443.html
Copyright © 2011-2022 走看看