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. placeholder的使用

    1.定义 placeholder 属性提供可描述输入字段预期值的提示信息 该提示会在输入字段为空时显示,并会在字段获得焦点时消失. 注释:placeholder 属性适用于以下的 <input& ...

  2. JavaScript权威指南--多媒体和图形编程

    知识要点 21.1节介绍如何用传统的JavaScript技术实现诸如图片翻转(鼠标指针移动到一张静态图片上切换成另外一张图片)这样的视觉效果. 21.2节介绍HTML5的<audio>和& ...

  3. Python 网络编程和Socket

    2017-07-24 20:43:49 Socket又称"套接字",应用程序通常通过"套接字"向网络发出请求或者应答网络请求.Http协议主要的操作流程是req ...

  4. C#通过XElement写入XML文件

    首先我们先看一下最终结果,如下: <?xml version="1.0" encoding="utf-8"?> <config> < ...

  5. 20161212xlVBA工作表数据整理合并单元格

    Sub NextSeven_CodeFrame() '应用程序设置 Application.ScreenUpdating = False Application.DisplayAlerts = Fal ...

  6. XML Publisher Using API’s(转)

    原文地址:XML Publisher Using API’s Applications Layer APIsThe applications layer of XML Publisher allows ...

  7. 使用a标签实现软件下载及下载量统计

    通常最简单的软件下载就是采用如下方式: <a id="welcomeMiddleBtn" href="${basePath}/files/client/instal ...

  8. vue中上传文件相同文件名没反应

    vue项目中会遇到上传文件的需求,jquery会有一些插件很方便,如果不使用插件网上的方法没有太容易的而且很多是原生JS或者基于jQuery操作dom结构的.那么在vue项目中如何实现呢,还有如何模拟 ...

  9. SQL Server 调优系列基础篇 - 索引运算总结

    前言 上几篇文章我们介绍了如何查看查询计划.常用运算符的介绍.并行运算的方式,有兴趣的可以点击查看. 本篇将分析在SQL Server中,如何利用先有索引项进行查询性能优化,通过了解这些索引项的应用方 ...

  10. ASP.NET MVC4 Razor

    2014-09-18 14:06 by 易code, 2854 阅读, 0 评论, 收藏, 编辑 1 Code Expressions  代码表达式 @表达式  or  @(Expressions ) ...