jquey弹出框demo
默认
$('#btn-01').click(function(){ $.dialog({ contentHtml : '<p>我是默认弹出对话框示例展示。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
自动关闭
$('#btn-01').click(function(){ $.dialog({ autoClose : 2500, contentHtml : '<p>我是自动关闭的对话框示例展示。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
无标题
$('#btn-03').click(function(){ $.dialog({ showTitle : false, contentHtml : '<p>我是没有标题的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
自定义标题
$('#btn-04').click(function(){ $.dialog({ titleText : '自定义标题', contentHtml : '<p>我是自定义标题的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
Comfirm 类型
$('#btn-05').click(function(){ $.dialog({ type : 'confirm', contentHtml : '<p>我是confirm类型的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
Comfirm 类型, 自定义按钮文字
$('#btn-06').click(function(){ $.dialog({ type : 'confirm', buttonText : { ok : '自定义-确定', cancel : '自定义-取消' }, contentHtml : '<p>我是confirm类型的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
Comfirm 类型, 按钮回调函数
$('#btn-07').click(function(){ $.dialog({ type : 'confirm', onClickOk : function(){ alert('你点了确定~~'); }, onClickCancel : function(){ alert('你点了取消~~'); }, contentHtml : '<p>我是confirm类型的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
Comfirm 类型, 状态回调函数
$('#btn-08').click(function(){ $.dialog({ type : 'confirm', onBeforeShow : function(){ alert('显示前执行~~') }, onShow : function(){ alert('显示完成后执行~~') }, onBeforeClosed : function(){ alert('关闭前执行~~') }, onClosed : function(){ alert('关闭后执行,可以看页面title是否改变~~'); document.title = '我已经关闭拉!'; }, contentHtml : '<p>我是confirm类型的对话框。</p> <p>我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。我只是用来占位的内容展示,仅仅用来占位撑起提示内容的高度。</p>' }); });
info 类型
$('#btn-09').click(function(){ $.dialog({ type : 'info', infoText : '加载中…', infoIcon : 'images/icon/loading.gif', autoClose : 2500 }); });
info 类型, HTML创建内容
$('#btn-12').click(function(){ $.dialog({ type : 'info', contentHtml : '<img class="info-icon" src="data:images/icon/success.png" alt="操作成功" /><p class="info-text">操作成功</p>', autoClose : 2500 }); });
info 类型, 更改状态
$('#btn-12').click(function(){ var infoDialog = $.dialog({ type : 'info', infoText : '加载中…', infoIcon : 'images/icon/loading.gif' }); window.setTimeout(function() { infoDialog.dialog.update({ autoClose : 1500, infoText : '操作成功', infoIcon : 'images/icon/success.png' }); }, 2500); });
jquey弹出框demo的更多相关文章
- 弹出框、遮罩层demo
仿alert.confirm的弹出框. 弹出后,用遮罩层将背景虚化. 代码如下: <html> <meta http-equiv="Content-Type" c ...
- Selenium2学习-040-JavaScript弹出框(alert、confirm、prompt)操作演示实例
弹出框是网页自动化测试常见得操作页面元素之一,常见的JavaScript弹出框有如下三种: 1.alert(message):方法用于显示带有一条指定消息和一个 OK 按钮的警告框.DemoAlert ...
- JS弹出框插件zDialog再次封装
zDialog插件网址:http://www.jq22.com/jquery-info2426 再次封装zDialog的代码: (function ($) { $.extend({ iDialog: ...
- js简单显示和隐藏div,触发超链接,动态更改button值,setInterval()简单使用,jquery easyui弹出框简单使用 .
js简单显示和隐藏div .<!DOCTYPE html> .<html> .<head> .<meta charset="UTF-8"& ...
- 自定义弹出框基于zepto 记得引入zepto
html <!DOCTYPE html> <html> <meta charset="utf-8"> <title></tit ...
- vh属性-- 一个永远垂直居中的弹出框
下面的demo,无论浏览器大小如何改变,滚动条是否滚动,弹出框永远水平垂直居中 <html> <head> <title></title> </h ...
- jQuery+css3弹出框插件
先来看DEMO:https://codepen.io/jonechen/pen/regjGG 插件的开发很简单,运用了CSS3的动画效果,并且弹出框的内容可以自定义.插件的默认配置参数有三个: var ...
- jquery dialog-优雅的弹出框
前面一章已经对datepicker的使用,做了简单的说明.这一章主要对dialog如何使用做个说明. jquery ui-dialog在web开发中运用还是比较多的.最常见的例子就是登 ...
- 基于HTML5 Canvas 实现弹出框
用户鼠标移入时,有弹出框出现,这样的需求很常见.这在处理HTML元素实现时简单,但是如果是对HTML5 Canvas 构成的图形进行处理,这种方法不再适用,因为Canvas使用的是另外一套机制,无论在 ...
随机推荐
- Python"sorted()"和".sort()"的区别
sorted(A-LIST)会返回一个新的object,不改变**A-LIST*本身. A-LIST.sort()会直接改变A-List,不产生新的object.
- [原创] Delphi InputBox、InputQuery函数
Delphi InputBox.InputQuery函数 两个函数都是弹框提示输入信息 function InputQuery(const ACaption, APrompt: string; var ...
- archetypeCatalog=internal
Properties中添加 archetypeCatalog=internal,不加这个参数,在maven生成骨架的时候将会非常慢.
- boost IOStreams
Boost.IOStreams provides numerous implementations of the two concepts. Devices which describes data ...
- Shorten IPv6 Address
题目链接 题意:转换一个128位的二进制串,变成16进制,并且格式为x:x:x:x:x:x:x:x然后多个相邻的0变成::,且只有一个::,求变成的字典序最小且最短的字符串. 思路:大水题,但是就是一 ...
- JS基础入门篇(四)—this的使用,模拟单选框,选项卡和复选框
1.this的使用 this js中的关键字 js内部已经定义好了,可以不声明 直接使用 this的指向问题 1. 在函数外部使用 this指向的是window 2. 在函数内部使用 有名函数 直接调 ...
- (转)超详细java中的ClassLoader详解
转:https://blog.csdn.net/briblue/article/details/54973413 ClassLoader翻译过来就是类加载器,普通的java开发者其实用到的不多,但对于 ...
- python中nonlocal 的作用域
''' nonlocal关键字用来在函数或其他作用域中使用外层(非全局)变量. ''' def work(): x = 0 def new_work(): nonlocal x x=x+3 retur ...
- B-Tree, B+Tree, B*树介绍
[数据结构]B-Tree, B+Tree, B*树介绍 转 [数据结构]B-Tree, B+Tree, B*树介绍 [摘要] 最近在看Mysql的存储引擎中索引的优化,神马是索引,支持啥索引.全是 ...
- springBoot JPA PageAble分页查询出错,PropertyReferenceException: No property creation found for type
PropertyReferenceException: No property creation found for type @RequestParam(required = false, defa ...