实现方法1:

HTML代码:

        <div class="top-left-corner"></div>
<div class="top-right-corner"></div>
<div class="bottom-left-corner"></div>
<div class="bottom-right-corner"></div>

CSS代码:

.top-left-corner {
width: 100px;
height: 100px;
background: #fff;
position: absolute;
top:;
left:;
opacity:;
} .top-right-corner {
width: 100px;
height: 100px;
background: #fff;
position: absolute;
top:;
right:;
opacity:;
} .bottom-left-corner {
width: 100px;
height: 100px;
background: #fff;
position: absolute;
bottom:;
left:;
opacity:;
} .bottom-right-corner {
width: 100px;
height: 100px;
background: #fff;
position: absolute;
bottom:;
right:;
opacity:;
}

JS代码:

let [left_top_flag, right_top_flag, left_bottom_flag, right_bottom_flag] = [0, 0, 0, 0];

$('.top-left-corner').on("vmousedown", function () {
[left_top_flag, right_top_flag, left_bottom_flag, right_bottom_flag] = [1, 0, 0, 0];
$(this).css({"background": "#999", "opacity": "0.5", "border-radius": "50px"});
}); $('.top-right-corner').on("vmousedown", function () {
if (left_top_flag) right_top_flag = 1;
else return;
$(this).css({"background": "#999", "opacity": "0.5", "border-radius": "50px"});
}); $('.bottom-right-corner').on("vmousedown", function () {
if (left_top_flag && right_top_flag) left_bottom_flag = 1;
else return;
$(this).css({"background": "#999", "opacity": "0.5", "border-radius": "50px"});
}); $('.bottom-left-corner').on("vmousedown", function () {
if (left_top_flag && right_top_flag && left_bottom_flag) [left_top_flag, right_top_flag, left_bottom_flag, right_bottom_flag] = [0, 0, 0, 0];
else return;
$(this).css({"background": "#999", "opacity": "0.5", "border-radius": "50px"});
$('.top-left-corner').css('background', 'none');
$('.top-right-corner').css('background', 'none');
$('.bottom-left-corner').css('background', 'none');
$('.bottom-right-corner').css('background', 'none');
openInframe("views/admin/chooseLogin.html", "进入管理员登录界面");
});

实现方法2:

HTML代码:

<div class="hidediv" id="tl"style="position:fixed; left:0px;top:0px;width:100px;height:100px;border:0px solid red;z-index:9999"></div>
<div class="hidediv"id="tr"style="position:fixed; left:1180px;top:0px;width:100px;height:100px;border:0px solid red;z-index:9999"></div>
<div class="hidediv"id="bl"style="position:fixed; left:0px;top:680px;width:100px;height:100px;border:0px solid red;z-index:9999"></div>
<div class="hidediv" id="br"style="position:fixed; left:1180px;top:680px;width:100px;height:100px;border:0px solid red;z-index:9999"></div>

JS代码:

$(".hidediv").click(hidedivCallback);

// 桌面四个角点击事件回调
function hidedivCallback() {
if (this.id == "tl") {
global.hideKey = "12";
$(this).addClass("bg-color-green");
} else if (this.id == "tr" && global.hideKey == "12") {
global.hideKey = "1234";
$(this).addClass("bg-color-green");
} else if (this.id == "br" && global.hideKey == "1234") {
global.hideKey = "123456";
$(this).addClass("bg-color-green");
} else if (this.id == "bl" && global.hideKey == "123456") {
global.hideKey = "";
$(".hidediv").removeClass("bg-color-green");
// parent.frames['mainframe'].location.href = "core/maintance/index.html";
parent.frames['mainframe'].location.href = "maintanceBranch.html"; //将core/maintance/index.html 修改为中转页面增加指纹采集
} else {
global.hideKey = "";
$(".hidediv").removeClass("bg-color-green");
}
}

HTML和JS完成页面点击四个角弹出管理页面的更多相关文章

  1. IPhone手机页面中点击文本输入框,弹出键盘,网页会放大,如何解决

    在head标签中加入以上meta声明.具体属性可以谷歌/百度. <meta name="viewport" content="width=device-width, ...

  2. js防止安卓手机软键盘弹出挤压页面导致变形的方法

    5防止安卓手机软键盘弹出挤压页面导致变形的方法 输入框定位在底部,手机端打开,输入框聚焦后软键盘打开为什么会瞬间自动关闭呢? 先看看问题: 1.原来是这样的: 2.在苹果手机里面是正常的: 3.到了安 ...

  3. js的事件冒泡和点击其他区域隐藏弹出层

    一.前言 在编写页面的时候,我们经常使用到弹出层.对于弹出层,原本的意义就是增加与用户的交互,提升用户的好感度.如果弹出层都没有较好的体验,那何谈通过交互来提升好感... 首先提出几个弹出层的注意点: ...

  4. jquery层居中,点击小图查看大图,弹出层居中代码,顶部层固定不动,滚动条滚动情况

    jquery层居中,点击小图查看大图,弹出层居中代码 http://www.cnblogs.com/simpledev/p/3566280.html 见第一版,发现一个情况,如果页面内容多出一屏的情况 ...

  5. 弹出框页面中使用jquery.validate验证控件

    弹出框页面中使用jquery.validate验证控件有几个问题需要解决: 1,弹出框的提交事件完成后如何关闭弹出框页面? 2,提交不成功如何返回当前页? 3,如果知道验证事件成功? 之前笔者都是JS ...

  6. ASP.NET查询页面设置form的action属性只弹出一个页面,并且每次将页面设置到最前

    原文:ASP.NET查询页面设置form的action属性只弹出一个页面,并且每次将页面设置到最前 背景 当数据量大.查询条件复杂,多样多的时候,我们可能需要单独做一个查询界面,当用户选择设置了相关的 ...

  7. 后盾网lavarel视频项目---页面post方式提交之后动态弹出错误信息

    后盾网lavarel视频项目---页面post方式提交之后动态弹出错误信息 一.总结 一句话总结: 1.思路和我想的一样,有错误的时候弹出提示错误消息的模态框就好,没有错误的时候不管它 2.把模态框的 ...

  8. 禁止手机页面中A标签长按弹出路径框

    //禁止手机页面中A标签长按弹出路径框    window.onload=function(){        document.documentElement.style.webkitTouchCa ...

  9. bootstrap 弹出框点击其他区域时弹出框不消失选项设置

    默认情况下,bootstrap 弹出框点击其他区域时,弹出框会自动关闭,在很多时候,我们可能会希望达到和原生弹出框一样的效果,避免不小心点击其他区域时弹框自动隐藏,尤其是对于一些复杂的表单,重复填写可 ...

随机推荐

  1. wex5 如何利用 百度地图 定位 和 天气插件

    引包: require("cordova!cordova-plugin-geolocation"); require("cordova!com.justep.cordov ...

  2. css 超出部分显示省略号 汇总

    单行: 加宽度 overflow: hidden; text-overflow:ellipsis; white-space: nowrap; 多行: display: -webkit-box; -we ...

  3. springmvc中的视图模型的返回方式

    way1:略过; way2:(神似way1)通过在方法的参数中添加一个Model类型的参数,,该参数由spring自动生成传入, 然后在方法内部使用addAttribute()方式添加模型数据, 最后 ...

  4. 【原】iptables 交叉编译

    防火墙在做数据包过滤决定时,有一套遵循和组成的规则,这些规则存储在专用的数据包过滤表中,而这些表集成在 Linux 内核中.在数据包过滤表中,规则被分组放在我们所谓的链(chain)中.而netfil ...

  5. Eureka实现高可用及为Eureka设置登录账号和密码

    本文通过两个eureka相互注册实现注册中心的高可用,同时为注册中心配置认证登录. 需要用到的maven配置 <dependency> <groupId>org.springf ...

  6. linux高性能服务器编程pdf免费下载

    百度云盘:链接: https://pan.baidu.com/s/1pLp4hHx 密码: wn4k

  7. .NET界面控件DevExpress全新发布v19.1.4|更改DCT解码器

    DevExpress Universal Subscription(又名DevExpress宇宙版或DXperience Universal Suite)是全球使用广泛的.NET用户界面控件套包,De ...

  8. hive中的null

    在处理流水增量表的时候,出现了一个判定的失误. select a.a1,a.a2 from ( select a.a1 ,,) as diff ,a.a2 from a lefter join b o ...

  9. thinkPHP模型定义

    批量新增 ArrayAccess类的属性当做数组访问 插入语句 这段代码说明,User继承的Model类的isupdate属性默认是isupdate,而User::get(1)把这一字段属性更新为tr ...

  10. C++ std::vector 总结笔记

    Initialization #include<iostream> #include<vector> using namespace std; int main() { vec ...