HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>layer</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="layer/layer.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</head>
<body>
<div class="btn">
<button onclick="MyClick1()">alert弹框美化</button>
<button onclick="MyClick2()">提示框美化</button>
<button onclick="MyClick3()">信息框</button>
<button onclick="MyClick4()">弹出div登录层</button>
</div> <div id="box">
<div class="box-con">
<input type="text">
</div>
<div class="box-con">
<input type="text">
</div>
<div class="box-con">
<a href="javascript:;">登录</a>
</div>
</div> </body>
</html>

CSS

*{
padding:;
margin:;
font-family: "华文行楷";
}
button{
width: 300px;
height: 60px;
color: #fff;
background-color: purple;
font-size: 44px;
}
.box-con input{
width: 350px;
height: 42px;
}
.box-con a{
width: 354px;
height: 50px;
background-color: #30c;
display: block;
text-align: center;
line-height: 50px;
color: #fff;
font-size: 30px;
text-decoration: none;
}
.box-con{
margin-left: 20px;
margin-top: 15px;
}
#box{
display: none;
}

JS

function MyClick1(){
//alert弹框美化
layer.alert("你好",{
title:"说明",
icon:7,
skin:"layui-layer-molv"
});
} function MyClick2(){
//提示框美化
layer.confirm("你确定吗?",{
title:"提示",
icon:3
},function(){
layer.alert("删除成功!",{icon:6});
},function(){
layer.alert("删除失败!",{icon:5});
});
} function MyClick3(){
//信息框
layer.msg("我是一个非常普通的信息框",{
icon:1,
time:2000
},function(){ //隐藏之后要做的事
location.href = "http://www.cnblogs.com/Harold-Hua/";
});
} function MyClick4(){
//弹出div登录层
layer.open({
type:1,
title:"登录",
area:["390px","270px"],
content:$("#box")
});
}

layer.js弹出框的更多相关文章

  1. bootstrap中popover.js(弹出框)使用总结+案例

    bootstrap中popover.js(弹出框)使用总结+案例 *转载请注明出处: 作者:willingtolove: http://www.cnblogs.com/willingtolove/p/ ...

  2. 使用layer显示弹出框笔记

    $.layer({     area : ['200px','auto'], //控制层宽高.当设置为auto时,意味着采用自适应, 当然,对于宽度,并不推荐这样做.例如:area : ['310px ...

  3. 【转】js弹出框、对话框、提示框、弹窗总结

    js弹出框.对话框.提示框.弹窗总结 一.js的三种最常见的对话框 //====================== JS最常用三种弹出对话框 ======================== //弹 ...

  4. js js弹出框、对话框、提示框、弹窗总结

    js弹出框.对话框.提示框.弹窗总结 一.JS的三种最常见的对话框 //====================== JS最常用三种弹出对话框 ======================== //弹 ...

  5. jQuery layer[页面弹出框]

    常见接口如下: 方法名 描述 $.layer({}) 核心接口,参数是一个对象,对象属性参见上述列表.诸如layer.alert()之类的为$.layer()的包装方法. layer.v 获取版本号. ...

  6. 5月12日上课笔记-js 弹出框、函数、程序调试、基本事件、浏览器对象模型

    一.弹出框 a.提示框 alert(); b.输入框 prompt(); c.确认框 confirm(); var flag= confirm("确认删除吗?"); 二.js程序调 ...

  7. 如何妥善处理WebBrowser对Javascript的错误问题,阻止JS弹出框,提高用户体验

    由于项目需求,最近转战客户端,开始搞浏览器开发.众所周知,现在在微软平台上开发浏览器,最常用的方法就是扩展Webbrowser,但是首先要清楚的是,WebBrowser控件仅仅是对WebBrowser ...

  8. JS弹出框插件zDialog再次封装

    zDialog插件网址:http://www.jq22.com/jquery-info2426 再次封装zDialog的代码: (function ($) { $.extend({ iDialog: ...

  9. 转:WebDriver(Selenium2) 处理可能存在的JS弹出框

    在自动化测试过程中,有些情况下我们会遇到一些潜在的Javascript弹出框.(即某些条件下才会出现,不是固定出现),然后如果当这种弹出框出现,我们没有加以处理,WebDriver将无法进行下一步的操 ...

随机推荐

  1. Python基础【day03】:字典(一)

    本节内容 简述 语法 字典的使用 字典内置方法 一.简述 字典是Python中的又一种数据结构,它是通过key-value的数据类型,跟我们小时候用的新华字典差不多,通过key去访问value 二.语 ...

  2. JAVA记录-消息队列介绍

    1.JMS概述 JMS即Java消息服务(Java Message Service)应用程序接口,是一个Java平台中关于面向消息中间件(MOM)的API,用于在两个应用程序之间,或分布式系统中发送消 ...

  3. Ubuntu14.10安装TensorFlow1.0.1

    本文记录了在Ubuntu上安装TensorFlow的步骤.系统环境:Ubuntu14.10 64bitPython版本:Python 2.7.8TensorFlow版:TensorFlow 1.0.1 ...

  4. centos redis集群搭建

    说明: 10.0.0.111部署6500,6501,6502三个主节点 10.0.0.222部署6500,6501,6502三个备份节点 1.安装redis:略 2.配置内核参数 # 配置 vm.ov ...

  5. Bootstrap --对话框及提示框的处理和优化

    源模态框使用:http://www.runoob.com/bootstrap/bootstrap-modal-plugin.html <!-- 按钮触发模态框 --> <button ...

  6. DCNN models

    r egion based RNN Fast RCNN Faster RCNN F-RCN Faster RCNN the first five layers is same as the ZF ne ...

  7. listcontrolc插入列时,出现断言错误

    原因:窗口还未创建,就对listcontrol进行了操作 解决方案:在初始化函数中 添加CDialogEx::OnInitDialog();

  8. php 全局变量问题

    当在函数里通过require_once包含另外php文件. 而另外php文件包含了另外php文件,而该php文件的函数需要另外的php文件. 例子: installment_maintenance_s ...

  9. LOJ 3043: 洛谷 P5280: 「ZJOI2019」线段树

    题目传送门:LOJ #3043. 题意简述: 你需要模拟线段树的懒标记过程. 初始时有一棵什么标记都没有的 \(n\) 阶线段树. 每次修改会把当前所有的线段树复制一份,然后对于这些线段树实行一次区间 ...

  10. manjaro 的配置

    一.更新源的配置: 1).自动方法: 在 终端 执行下面的命令从官方的源列表中对中国源进行测速和设置 sudo pacman-mirrors -c China 2).手动方法 自动方法(上面的方法1, ...