jQuery dialog 简介
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<script type="text/javascript" src="jquery-1.7.2.min.js"> </script>
<link rel="stylesheet" type="text/css" href="jquery-ui-1.8.23.custom.css">
<script type="text/javascript" src="jquery-ui-1.8.23.custom.min.js"> </script>
<style type="text/css">
.titleClass{border:2px solid green;font-size:20px;background-color:yellow;}
</style>
<script type="text/javascript">
$(function(){
$("#dv1").dialog({
hide:true,//点击关闭时使对话框关闭(隐藏),可添加动画效果,如:hide:"slide"
autoOpen:false, //true时,默认页面加载完毕后自动弹出对话框
closeOnEscape:true,//当对话框打开时,用户按Esc键是否关闭对话框
dialogClass:'titleClass',//为对话框设置指定的样式类名称
height:380,//还可以 height:auto
width:300,
modal:true,//是否为模式窗口
title:'测试一下',
draggable:true,//是否允许拖动对话框的标题栏移动窗口
position:'center',//设置对话框的初始显示位置,可选值:'center','left','right','top','bottom',或是一个数组['right','top']
resizable:true,//对话框是否可调整大小
show:'slide',//显示对话框的方式
stack:true,//移动时对话框是否前置于其他对话框前面
zIndex:1000,//设置对话框的zIndex值,还可以:zIndex:Integer
overlay:{opacity:0.5,background:"black",overflow:'auto'},
buttons:{
'确定':function(){
//处理方法
//AddUser();
alert("你点击了添加按钮");
},
'取消':function(){
//关闭当前dialog
$(this).dialog('close');
}
}
})
$("#dv2").dialog({
autoOpen:true,
height:400,
buttons:{'OK':function(){},"Cancel":function(){}}
}) $("#btn").button().click(function(){ //此处的button()函数是jQueryUI中定义的函数,表示使用jQuery中button样式
$("#dv1").dialog("open");
}) $("#btn_2").button().click(function(){
$("#dv2").dialog("open");
}) $(".btn").click(function(){
$("#dv1").dialog("open");
})
}) </script>
</head> <body>
<input class="btn" type="button" value="点击一下试试"/>
<button id="btn" >点击一下试试_Button</button>
<button id="btn_2">点击一下试试_Button_2</button>
<div id="dv1">
<fieldset> <!-- fieldset 元素可将表单内的相关元素分组 -->
<legend>请填写信息</legend> <!-- <legend>标签为fieldset元素定义标题 -->
<label for="name">Name</label> <!-- <label>标签的for属性规定label与哪个表单元素绑定 -->
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
<label for="email">Email</label>
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
<label for="password">Password</label>
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
</fieldset> </div>
<div id="dv2">
<fieldset>
<legend>请再次确认信息</legend>
<label for="name">Name_2</label>
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
<label for="email">Email_2</label>
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
<label for="password">Password_2</label>
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
</fieldset>
</div>
</body>
</html>
jQuery dialog 简介的更多相关文章
- jquery dialog open后,服务器端控件失效的快速解决方法
jquery dialog为我们提供了非常漂亮实用的对话框,比单调的alert.confirm.prompt好用很多. 在使用jquery与.net共同开发时,直接调用jquery dialog的op ...
- jQuery Dialog弹出层对话框插件
Dialog.js的相关注释已经添加,可以按照注释,进行相关样式的修改,适用于自定义的各个系统! dialog.js /** * jQuery的Dialog插件. * * @param object ...
- JQuery Dialog 禁用X按钮关闭对话框,-摘自网络
JQuery Dialog 禁用X按钮关闭对话框,禁用ESC键关闭代码如下:$("#div1").dialog({ closeOnEscape: false, open: ...
- MVC3+EF5.0 code first+Flexigrid+ajax请求+jquery dialog 增删改查
MVC3+EF5.0 code first+Flexigrid+ajax请求+jquery dialog 增删改查 本文的目的: 1.MVC3项目简单配置EF code first生成并初始化数据 ...
- 使用jquery dialog
网页开发中,弹窗还是很有必要的.本人比较喜欢jquery ui的dialog. 但是jquery dialog中也有一些略显不方便的,如:没有z-index的参数设置,脚部的按钮样式没办法自定义…… ...
- jquery dialog的一些坑
jquery dialog工具可以方便的生成一个弹出框,但是在一些需要多个弹出框的应用场景上会有一些bug 具体场景: 当使用过一次模态框之后,使用另外的一个模态框时,已经消失不见的模态框会重新出来 ...
- Jquery 内容简介
内容简介 内容简介 • 什么是Jquery • 万能的选择器 • 管理jQuery包装集 • 使用jQuery操作元素的属性与样式 • 事件与事件对象 • jQuery中的Ajax • jQuery ...
- jQuery.dialog
本篇文章主要是对JQUERY中dialog的用法进行了详细的分析介绍,需要的朋友可以过来参考下,希望对大家有所帮助 今天用到了客户端的对话框,把 jQuery UI 中的对话框学习了一下. 准备 jQ ...
- JQUERY dialog的用法详细解析
本篇文章主要是对JQUERY中dialog的用法进行了详细的分析介绍,需要的朋友可以过来参考下,希望对大家有所帮助 今天用到了客户端的对话框,把 jQuery UI 中的对话框学习了一下. 准备 jQ ...
随机推荐
- Windows Performance Monitoring with perfmon
直接引用 - https://technet.microsoft.com/en-us/magazine/2008.08.pulse.aspx
- Embed对象
1.EMBED 元素 | embed 对象 http://www.jb51.net/shouce/dhtml/objects/EMBED.html 2. 3.
- Perl 语法 - 基础
perl语言的核心是正则表达式,在文本处理上非常有优势,与python类似,但语法不同,perl的语法很灵活,用多了才会觉得好用. 常用知识点总结: perl语法类似于C语言(perl源于Unix), ...
- Selenium Grid Configuration
Start Hub and Node with Json config 1. Start Hub with json config file title HubWebDriver java -jar ...
- libCEF总结02字符串
libCEF 的 CefString.cef_string_t 在 Windows 下均表示一个 16 位的 Unicode 字符串,它们的使用请参考下面的代码 {//wchar_t* ==> ...
- mydbtest文档
mydbtest是楼方鑫编写的一个数据库测试工具,有需要的话,请自取 http://pan.baidu.com/s/1mgJpukg#path=%252FOneSQL%252FDocument 找到& ...
- as的Enter_Frame与Timer
As3中的Timer和Event.EnterFrame是有明显的区别的. Evnet.EnterFrame是定时间隔多少时间出发.如果执行时间比间隔时间长,则会间隔执行时间这么久. 举个例子: Fla ...
- 制作Aspose CHM文档的过程记录
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...
- astyle 使用说明
欢迎关注我的社交账号: 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://github.com/jiangxincode 知乎地址 ...
- AndroidManifest.xml清单文件要点
AndroidManifest.xml AndroidManifest.xml清单文件通常包括如下内容: 应用程序的包名,该包名作为该应用的唯一标识. 应用包含的组件,如Activity,Servic ...