var str = "<div id=\"zhezhao\" style=\"display:none; background-color: rgba(0,0,0,0.3); width: 100%; height: 100%; position: fixed; top: 0px; left: 0px; z-index: 9999;\">";
str += "<div id=\"tanchuang\" style=\"width: 300px; margin: auto; top:-500px; position: relative; background-color: white; box-shadow: 0px 0px 10px black; border-radius: 5px; font-family: 微软雅黑;\">";
str += "<div id=\"tc-title\" style=\"width: 100%; height: 40px; position: relative; text-indent: 15px; line-height: 40px; background-color: #808080;\"></div>";
str += "<div id=\"tc-context\" style=\"width: 100%; height: 30px; position: relative; margin-top: 20px; text-align: center; line-height: 30px; font-size: 1.3em;\"></div>";
str += "<div id=\"tc-btns\" style=\"width: 100%; height: 30px; position: relative; margin-top: 20px;\">";
str += "<div id=\"tc-btn1\" style=\"width: 80px; height: 30px; position: relative; left: 110px; background-color: red; text-align: center; line-height: 30px; color: white; font-size: 1.2em; border-radius: 5px;cursor:pointer;\">确 定</div>";
str += "</div><div style=\"width: 100%; height: 30px; position: relative;\"></div></div></div>";
document.getElementsByTagName("body")[].innerHTML += str; function SelfAlert(t, c) {
$("#tc-title").text(t);
$("#tc-context").text(c);
$("#zhezhao").css("display", "block");
$("#tanchuang").animate({ top: "200px" }, ).animate({ top: "150px" }, ).animate({ top: "200px" }, );
} $("#tc-btn1").live("click", function () {
$("#tanchuang").animate({ top: "250px" }, ).animate({ top: "-500px" }, , function () {
$("#zhezhao").css("display", "none");
});
}); $("#tc-btn1").live("mouseover", function () {
$(this).animate({ backgroundColor: "#890606" }, );
});
$("#tc-btn1").live("mouseout", function () {
$(this).animate({ backgroundColor: "red" }, );
});

JS代码

JQuery 遮罩层弹窗的更多相关文章

  1. div 遮罩层 弹窗

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  2. jQuery遮罩层的实现

    遮罩层其实就是一个占据整个页面的半透明效果的页面元素,一般用div实现.页面中实现遮罩层,无非就是为了让用户只能操作弹出窗口的内容,而不允许操作弹出窗口外的内容. 在实现时,我使用了两个div,一个遮 ...

  3. jQuery遮罩层登录对话框

    用户登录是许多网站必备的功能.有一种方式就是不管在网站的哪个页面,点击登录按钮就会弹出一个遮罩层,显示用户登录的对话框.这用方式比较灵活方便.而现在扫描二维码登录的方式也是很常见,例如QQ.微信.百度 ...

  4. jQuery遮罩层插件

    在网页上常常遇到须要等待非常久的操作,比方导出报表等.为了预防用户点击其它操作或者多次点击同个功能,须要用遮罩层把页面或者操作区盖住.防止用户进行下一步操作.同一时候能够提高界面友好度,让用户知道操作 ...

  5. jquery 遮罩层显示img

    如果点击iframe中的image显示整个页面的遮罩层,可参考如下: http://blog.csdn.net/shiaijuan1/article/details/70160714 具体思路就是,顶 ...

  6. jquery遮罩层

    (function () { //遮罩层实现 zhe zhao ceng kexb 2016.2.24 $.extend($.fn, { mask: function (msg, maskDivCla ...

  7. jQuery带遮罩层弹窗实现(附源码)

    1.CSS样式 <style type="text/css"> body { font:11px/1.6em Microsoft Yahei; background:# ...

  8. jQuery遮罩层效果

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  9. jquery 遮罩层指定位置

    .css .datagrid-mask-msg { position: absolute; top: %; margin-top: -20px; padding: 12px 5px 10px 30px ...

随机推荐

  1. http 相关文章

    1. 百度百科 2.http | MDN 3.协议讲解 4.经典题 5.http与https的区别 6. http服务器返回状态总结 7.网络七层协议 开放式系统互联参考模型(OSI)的7层从上到下分 ...

  2. 解决Resource doesn't have a corresponding Go package.问题

    首先上图 这个报错主要是程序要启动没有入口的原因,package main下边的mian方法才是一个程序的入口.这就要 修改目录结构如下图修改并运行就可以了

  3. Codeforces 888E - Maximum Subsequence(折半枚举(meet-in-the-middle))

    888E - Maximum Subsequence 思路:折半枚举. 代码: #include<bits/stdc++.h> using namespace std; #define l ...

  4. 二分检索函数lower_bound()和upper_bound()

    二分检索函数lower_bound()和upper_bound() 一.说明 头文件:<algorithm> 二分检索函数lower_bound()和upper_bound() lower ...

  5. 20170517xlVBA添加数据透视表

    Sub AddPovitTable() 'Constance Const DATA_SHEET As String = "Advanced Filter" Const DATA_A ...

  6. C/C++中的实参和形参,重点以及盲点,自己以前未知的

    C/C++中的实参和形参   今天突然看到一道关于形参和实参的题,我居然不求甚解.藐视过去在我的脑海里只有一个参数的概念,对于形参和实参的区别还真的不知道,作为学习了几年C++的人来说,真的深深感觉对 ...

  7. IOS8-人机界面指南

    [ISUX转译]iOS 8人机界面指南(一):UI设计基础 糖箔糊2014.09.23 文章索引 1.1 为iOS而设计(Designing for iOS) 1.1.1 以内容为核心(Defer t ...

  8. ajax传递数组、form表单提交对象数组

    在JSP页面开发中,我们常常会用到form表单做数据提交,由于以前一直只是使用form表单提交单个对象,只要表单文本域的name值和接收的对象的属性名一致,那么传值就没有什么问题.不过,在前几天的开发 ...

  9. httpclient 连接路由

    http路由 httpclient能够直接或通过路由建立连接到目标主机,这会涉及多个中间连接,也被称为跳. Httpclient区分路由和普通连接,通道和分层. 通道连接到目标主机的多个中间代理的使用 ...

  10. 基于Dlib、OpenCV开发人脸识别程序的开发建议

    前言 在去年十月的时候参加了一个小比赛,做了一个人脸识别程序并很意外地获得省里面的一等奖,视频演示链接在这里,有同学想要做这方面的毕业设计or课程设计,发一篇博客来分享一下当时的开发过程. 视频演示链 ...