实现方法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. django 实现 Mock Server

    大佬 flask 实现mock server地址:https://github.com/yinquanwang/MockServer 参考使用django实现了一下,并已部署到EasyTest测试平台 ...

  2. CRF++的使用(待更新)

    1.下载CRF++(Windows和Linux两个版本) 2.目录如下: 主要用到crf_learn.exe ,crf_test.exe和libcrfpp.dll三个文件 doc文件夹:官方主页 ex ...

  3. mariadb增删改查

    数据库用户的操作 登录前需先启动3306端口. 首次启动需初始化数据库 mysql_secure_installation 增/改: 创建用户及赋予用户指定权限 grant 权限(分为create[创 ...

  4. Nagios-Nagios-Nagios系统监控(centos7部署源码)

    一.Nagios简介 Nagios是一款开源的电脑系统和网络监视工具,能有效监控Windows.Linux和Unix的主机状态,交换机路由器等网络设置,打印机等.在系统或服务状态异常时发出邮件或短信报 ...

  5. HDU 6215 Brute Force Sorting 模拟双端链表

    一层一层删 链表模拟 最开始写的是一个一个删的 WA #include <bits/stdc++.h> #define PI acos(-1.0) #define mem(a,b) mem ...

  6. mysql视图创建

    create or replace view partner_v as select a.id,vendorname,address,nation,contactperson,tel1,tel2,jy ...

  7. return和exit以及C语言递归函数

    return 在主函数main()中,return整个函数退出,在子函数中return,只退出子函数. exit exit无论在函数什么位置退出整个函数 递归函数 #include <stdio ...

  8. Gym-100923A-Por Costel and Azerah(DP)

    链接: https://vjudge.net/problem/Gym-100923A 题意: Por Costel the Pig has received a royal invitation to ...

  9. 使用命令在navicat中创建数据库和用户

    一.用高权限账号登录,即创建连接 二.选择高权限用户右键,调出命令窗口 三.使用sql语句创建数据库 create database 数据库名 DEFAULT CHARACTER SET gbk CO ...

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

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